You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
<spanid="sphx-glr-tutorials-toolkits-mplot3d-py"></span><h1>The mplot3d Toolkit<aclass="headerlink" href="#the-mplot3d-toolkit" title="Permalink to this headline">#</a></h1>
<p>Generating 3D plots using the mplot3d toolkit.</p>
<p>3D Axes (of class <aclass="reference internal" href="../../api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D.html#mpl_toolkits.mplot3d.axes3d.Axes3D" title="mpl_toolkits.mplot3d.axes3d.Axes3D"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Axes3D</span></code></a>) are created by passing the <codeclass="docutils literal notranslate"><spanclass="pre">projection="3d"</span></code>
<p><spanclass="versionmodified changed">Changed in version 1.0.0: </span>Prior to Matplotlib 1.0.0, only a single <aclass="reference internal" href="../../api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D.html#mpl_toolkits.mplot3d.axes3d.Axes3D" title="mpl_toolkits.mplot3d.axes3d.Axes3D"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Axes3D</span></code></a> could be created per
figure; it needed to be directly instantiated as <codeclass="docutils literal notranslate"><spanclass="pre">ax</span><spanclass="pre">=</span><spanclass="pre">Axes3D(fig)</span></code>.</p>
</div>
<divclass="versionchanged">
<p><spanclass="versionmodified changed">Changed in version 3.2.0: </span>Prior to Matplotlib 3.2.0, it was necessary to explicitly import the
<aclass="reference internal" href="../../api/toolkits/mplot3d.html#module-mpl_toolkits.mplot3d" title="mpl_toolkits.mplot3d"><codeclass="xref py py-mod docutils literal notranslate"><spanclass="pre">mpl_toolkits.mplot3d</span></code></a> module to make the '3d' projection to
<p>See the <aclass="reference internal" href="../../api/toolkits/mplot3d/faq.html#toolkit-mplot3d-faq"><spanclass="std std-ref">mplot3d FAQ</span></a> for more information about the mplot3d
toolkit.</p>
<sectionid="line-plots">
<spanid="plot3d"></span><h2>Line plots<aclass="headerlink" href="#line-plots" title="Permalink to this headline">#</a></h2>
<spanclass="sig-prename descclassname"><spanclass="pre">Axes3D.</span></span><spanclass="sig-name descname"><spanclass="pre">plot</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">xs</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">ys</span></span></em>, <emclass="sig-param"><spanclass="o"><spanclass="pre">*</span></span><spanclass="n"><spanclass="pre">args</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">zdir</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">'z'</span></span></em>, <emclass="sig-param"><spanclass="o"><spanclass="pre">**</span></span><spanclass="n"><spanclass="pre">kwargs</span></span></em><spanclass="sig-paren">)</span><aclass="reference external" href="https://github.com/matplotlib/matplotlib/blob/v3.5.2/lib/mpl_toolkits/mplot3d/axes3d.py#L1464-L1503"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink" href="#mpl_toolkits.mplot3d.Axes3D.plot" title="Permalink to this definition">#</a></dt>
<dd><p>Plot 2D or 3D data.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><dlclass="simple">
<dt><strong>xs</strong><spanclass="classifier">1D array-like</span></dt><dd><p>x coordinates of vertices.</p>
</dd>
<dt><strong>ys</strong><spanclass="classifier">1D array-like</span></dt><dd><p>y coordinates of vertices.</p>
</dd>
<dt><strong>zs</strong><spanclass="classifier">float or 1D array-like</span></dt><dd><p>z coordinates of vertices; either one for all points or one for
each point.</p>
</dd>
<dt><strong>zdir</strong><spanclass="classifier">{'x', 'y', 'z'}, default: 'z'</span></dt><dd><p>When plotting 2D data, the direction to use as z ('x', 'y' or 'z').</p>
</dd>
<dt><strong>**kwargs</strong></dt><dd><p>Other arguments are forwarded to <aclass="reference internal" href="../../api/_as_gen/matplotlib.axes.Axes.plot.html#matplotlib.axes.Axes.plot" title="matplotlib.axes.Axes.plot"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">matplotlib.axes.Axes.plot</span></code></a>.</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
</section>
<sectionid="scatter-plots">
<spanid="scatter3d"></span><h2>Scatter plots<aclass="headerlink" href="#scatter-plots" title="Permalink to this headline">#</a></h2>
<spanclass="sig-prename descclassname"><spanclass="pre">Axes3D.</span></span><spanclass="sig-name descname"><spanclass="pre">scatter</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">xs</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">ys</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">zs</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">0</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">zdir</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">'z'</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">s</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">20</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">c</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">depthshade</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">True</span></span></em>, <emclass="sig-param"><spanclass="o"><spanclass="pre">*</span></span><spanclass="n"><spanclass="pre">args</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">data</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="o"><spanclass="pre">**</span></span><spanclass="n"><spanclass="pre">kwargs</span></span></em><spanclass="sig-paren">)</span><aclass="reference external" href="https://github.com/matplotlib/matplotlib/blob/v3.5.2/lib/mpl_toolkits/mplot3d/axes3d.py#L2326-L2398"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink" href="#mpl_toolkits.mplot3d.Axes3D.scatter" title="Permalink to this definition">#</a></dt>
<dd><p>Create a scatter plot.</p>
<dlclass="field-list">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><dl>
<dt><strong>xs, ys</strong><spanclass="classifier">array-like</span></dt><dd><p>The data positions.</p>
</dd>
<dt><strong>zs</strong><spanclass="classifier">float or array-like, default: 0</span></dt><dd><p>The z-positions. Either an array of the same length as <em>xs</em> and
<em>ys</em> or a single value to place all points in the same plane.</p>
</dd>
<dt><strong>zdir</strong><spanclass="classifier">{'x', 'y', 'z', '-x', '-y', '-z'}, default: 'z'</span></dt><dd><p>The axis direction for the <em>zs</em>. This is useful when plotting 2D
data on a 3D Axes. The data must be passed as <em>xs</em>, <em>ys</em>. Setting
<em>zdir</em> to 'y' then plots the data to the x-z-plane.</p>
<p>See also <aclass="reference internal" href="../../gallery/mplot3d/2dcollections3d.html"><spanclass="doc">Plot 2D data on 3D plot</span></a>.</p>
</dd>
<dt><strong>s</strong><spanclass="classifier">float or array-like, default: 20</span></dt><dd><p>The marker size in points**2. Either an array of the same length
as <em>xs</em> and <em>ys</em> or a single value to make all markers the same
size.</p>
</dd>
<dt><strong>c</strong><spanclass="classifier">color, sequence, or sequence of colors, optional</span></dt><dd><p>The marker color. Possible values:</p>
<ulclass="simple">
<li><p>A single color format string.</p></li>
<li><p>A sequence of colors of length n.</p></li>
<li><p>A sequence of n numbers to be mapped to colors using <em>cmap</em> and
<em>norm</em>.</p></li>
<li><p>A 2D array in which the rows are RGB or RGBA.</p></li>
</ul>
<p>For more details see the <em>c</em> argument of <aclass="reference internal" href="../../api/_as_gen/matplotlib.axes.Axes.scatter.html#matplotlib.axes.Axes.scatter" title="matplotlib.axes.Axes.scatter"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">scatter</span></code></a>.</p>
</dd>
<dt><strong>depthshade</strong><spanclass="classifier">bool, default: True</span></dt><dd><p>Whether to shade the scatter markers to give the appearance of
depth. Each call to <codeclass="docutils literal notranslate"><spanclass="pre">scatter()</span></code> will perform its depthshading
independently.</p>
</dd>
<dt><strong>data</strong><spanclass="classifier">indexable object, optional</span></dt><dd><p>If given, the following parameters also accept a string <codeclass="docutils literal notranslate"><spanclass="pre">s</span></code>, which is
interpreted as <codeclass="docutils literal notranslate"><spanclass="pre">data[s]</span></code> (unless this raises an exception):</p>
<dt><strong>**kwargs</strong></dt><dd><p>All other arguments are passed on to <aclass="reference internal" href="../../api/_as_gen/matplotlib.axes.Axes.scatter.html#matplotlib.axes.Axes.scatter" title="matplotlib.axes.Axes.scatter"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">scatter</span></code></a>.</p>
<spanclass="sig-prename descclassname"><spanclass="pre">Axes3D.</span></span><spanclass="sig-name descname"><spanclass="pre">plot_wireframe</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">X</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">Y</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">Z</span></span></em>, <emclass="sig-param"><spanclass="o"><spanclass="pre">*</span></span><spanclass="n"><spanclass="pre">args</span></span></em>, <emclass="sig-param"><spanclass="o"><spanclass="pre">**</span></span><spanclass="n"><spanclass="pre">kwargs</span></span></em><spanclass="sig-paren">)</span><aclass="reference external" href="https://github.com/matplotlib/matplotlib/blob/v3.5.2/lib/mpl_toolkits/mplot3d/axes3d.py#L1793-L1910"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink" href="#mpl_toolkits.mplot3d.Axes3D.plot_wireframe" title="Permalink to this definition">#</a></dt>
<dd><p>Plot a 3D wireframe.</p>
<divclass="admonition note">
<pclass="admonition-title">Note</p>
<p>The <em>rcount</em> and <em>ccount</em> 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.</p>
</div>
<dlclass="field-list">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><dl>
<dt><strong>X, Y, Z</strong><spanclass="classifier">2D arrays</span></dt><dd><p>Data values.</p>
</dd>
<dt><strong>rcount, ccount</strong><spanclass="classifier">int</span></dt><dd><p>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.</p>
</dd>
<dt><strong>rstride, cstride</strong><spanclass="classifier">int</span></dt><dd><p>Downsampling stride in each direction. These arguments are
mutually exclusive with <em>rcount</em> and <em>ccount</em>. If only one of
<em>rstride</em> or <em>cstride</em> 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.</p>
<p>'classic' mode uses a default of <codeclass="docutils literal notranslate"><spanclass="pre">rstride</span><spanclass="pre">=</span><spanclass="pre">cstride</span><spanclass="pre">=</span><spanclass="pre">1</span></code> instead
of the new default of <codeclass="docutils literal notranslate"><spanclass="pre">rcount</span><spanclass="pre">=</span><spanclass="pre">ccount</span><spanclass="pre">=</span><spanclass="pre">50</span></code>.</p>
</dd>
<dt><strong>**kwargs</strong></dt><dd><p>Other arguments are forwarded to <aclass="reference internal" href="../../api/_as_gen/mpl_toolkits.mplot3d.art3d.Line3DCollection.html#mpl_toolkits.mplot3d.art3d.Line3DCollection" title="mpl_toolkits.mplot3d.art3d.Line3DCollection"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Line3DCollection</span></code></a>.</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
</section>
<sectionid="surface-plots">
<spanid="surface"></span><h2>Surface plots<aclass="headerlink" href="#surface-plots" title="Permalink to this headline">#</a></h2>
<spanclass="sig-prename descclassname"><spanclass="pre">Axes3D.</span></span><spanclass="sig-name descname"><spanclass="pre">plot_surface</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">X</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">Y</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">Z</span></span></em>, <emclass="sig-param"><spanclass="o"><spanclass="pre">*</span></span><spanclass="n"><spanclass="pre">args</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">norm</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">vmin</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">vmax</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">lightsource</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="o"><spanclass="pre">**</span></span><spanclass="n"><spanclass="pre">kwargs</span></span></em><spanclass="sig-paren">)</span><aclass="reference external" href="https://github.com/matplotlib/matplotlib/blob/v3.5.2/lib/mpl_toolkits/mplot3d/axes3d.py#L1507-L1712"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink" href="#mpl_toolkits.mplot3d.Axes3D.plot_surface" title="Permalink to this definition">#</a></dt>
<dd><p>Create a surface plot.</p>
<p>By default it will be colored in shades of a solid color, but it also
supports colormapping by supplying the <em>cmap</em> argument.</p>
<divclass="admonition note">
<pclass="admonition-title">Note</p>
<p>The <em>rcount</em> and <em>ccount</em> 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.</p>
</div>
<divclass="admonition note">
<pclass="admonition-title">Note</p>
<p>To maximize rendering speed consider setting <em>rstride</em> and <em>cstride</em>
to divisors of the number of rows minus 1 and columns minus 1
respectively. For example, given 51 rows rstride can be any of the
divisors of 50.</p>
<p>Similarly, a setting of <em>rstride</em> and <em>cstride</em> equal to 1 (or
<em>rcount</em> and <em>ccount</em> equal the number of rows and columns) can use
the optimized path.</p>
</div>
<dlclass="field-list">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><dl>
<dt><strong>X, Y, Z</strong><spanclass="classifier">2D arrays</span></dt><dd><p>Data values.</p>
</dd>
<dt><strong>rcount, ccount</strong><spanclass="classifier">int</span></dt><dd><p>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.</p>
</dd>
<dt><strong>rstride, cstride</strong><spanclass="classifier">int</span></dt><dd><p>Downsampling stride in each direction. These arguments are
mutually exclusive with <em>rcount</em> and <em>ccount</em>. If only one of
<em>rstride</em> or <em>cstride</em> is set, the other defaults to 10.</p>
<p>'classic' mode uses a default of <codeclass="docutils literal notranslate"><spanclass="pre">rstride</span><spanclass="pre">=</span><spanclass="pre">cstride</span><spanclass="pre">=</span><spanclass="pre">10</span></code> instead
of the new default of <codeclass="docutils literal notranslate"><spanclass="pre">rcount</span><spanclass="pre">=</span><spanclass="pre">ccount</span><spanclass="pre">=</span><spanclass="pre">50</span></code>.</p>
</dd>
<dt><strong>color</strong><spanclass="classifier">color-like</span></dt><dd><p>Color of the surface patches.</p>
</dd>
<dt><strong>cmap</strong><spanclass="classifier">Colormap</span></dt><dd><p>Colormap of the surface patches.</p>
</dd>
<dt><strong>facecolors</strong><spanclass="classifier">array-like of colors.</span></dt><dd><p>Colors of each individual patch.</p>
</dd>
<dt><strong>norm</strong><spanclass="classifier">Normalize</span></dt><dd><p>Normalization for the colormap.</p>
</dd>
<dt><strong>vmin, vmax</strong><spanclass="classifier">float</span></dt><dd><p>Bounds for the normalization.</p>
</dd>
<dt><strong>shade</strong><spanclass="classifier">bool, default: True</span></dt><dd><p>Whether to shade the facecolors. Shading is always disabled when
<em>cmap</em> is specified.</p>
</dd>
<dt><strong>lightsource</strong><spanclass="classifier"><aclass="reference internal" href="../../api/_as_gen/matplotlib.colors.LightSource.html#matplotlib.colors.LightSource" title="matplotlib.colors.LightSource"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">LightSource</span></code></a></span></dt><dd><p>The lightsource to use when <em>shade</em> is True.</p>
</dd>
<dt><strong>**kwargs</strong></dt><dd><p>Other arguments are forwarded to <aclass="reference internal" href="../../api/_as_gen/mpl_toolkits.mplot3d.art3d.Poly3DCollection.html#mpl_toolkits.mplot3d.art3d.Poly3DCollection" title="mpl_toolkits.mplot3d.art3d.Poly3DCollection"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Poly3DCollection</span></code></a>.</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
</section>
<sectionid="tri-surface-plots">
<spanid="trisurface"></span><h2>Tri-Surface plots<aclass="headerlink" href="#tri-surface-plots" title="Permalink to this headline">#</a></h2>
<p>in which case a Triangulation object will be created. See
<aclass="reference internal" href="../../api/tri_api.html#matplotlib.tri.Triangulation" title="matplotlib.tri.Triangulation"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Triangulation</span></code></a> for a explanation of these possibilities.</p>
<p>where <em>Z</em> is the array of values to contour, one per point
in the triangulation.</p>
<dlclass="field-list">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><dl>
<dt><strong>X, Y, Z</strong><spanclass="classifier">array-like</span></dt><dd><p>Data values as 1D arrays.</p>
</dd>
<dt><strong>color</strong></dt><dd><p>Color of the surface patches.</p>
</dd>
<dt><strong>cmap</strong></dt><dd><p>A colormap for the surface patches.</p>
</dd>
<dt><strong>norm</strong><spanclass="classifier">Normalize</span></dt><dd><p>An instance of Normalize to map values to colors.</p>
</dd>
<dt><strong>vmin, vmax</strong><spanclass="classifier">float, default: None</span></dt><dd><p>Minimum and maximum value to map.</p>
</dd>
<dt><strong>shade</strong><spanclass="classifier">bool, default: True</span></dt><dd><p>Whether to shade the facecolors. Shading is always disabled when
<em>cmap</em> is specified.</p>
</dd>
<dt><strong>lightsource</strong><spanclass="classifier"><aclass="reference internal" href="../../api/_as_gen/matplotlib.colors.LightSource.html#matplotlib.colors.LightSource" title="matplotlib.colors.LightSource"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">LightSource</span></code></a></span></dt><dd><p>The lightsource to use when <em>shade</em> is True.</p>
</dd>
<dt><strong>**kwargs</strong></dt><dd><p>All other arguments are passed on to
<spanclass="sig-prename descclassname"><spanclass="pre">Axes3D.</span></span><spanclass="sig-name descname"><spanclass="pre">contour</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">X</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">Y</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">Z</span></span></em>, <emclass="sig-param"><spanclass="o"><spanclass="pre">*</span></span><spanclass="n"><spanclass="pre">args</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">extend3d</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">False</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">stride</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">5</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">zdir</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">'z'</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">offset</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">data</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="o"><spanclass="pre">**</span></span><spanclass="n"><spanclass="pre">kwargs</span></span></em><spanclass="sig-paren">)</span><aclass="reference external" href="https://github.com/matplotlib/matplotlib/blob/v3.5.2/lib/mpl_toolkits/mplot3d/axes3d.py#L2103-L2140"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink" href="#mpl_toolkits.mplot3d.Axes3D.contour" title="Permalink to this definition">#</a></dt>
<dd><p>Create a 3D contour plot.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><dlclass="simple">
<dt><strong>X, Y, Z</strong><spanclass="classifier">array-like,</span></dt><dd><p>Input data. See <aclass="reference internal" href="../../api/_as_gen/matplotlib.axes.Axes.contour.html#matplotlib.axes.Axes.contour" title="matplotlib.axes.Axes.contour"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">contour</span></code></a> for acceptable
data shapes.</p>
</dd>
<dt><strong>extend3d</strong><spanclass="classifier">bool, default: False</span></dt><dd><p>Whether to extend contour in 3D.</p>
</dd>
<dt><strong>stride</strong><spanclass="classifier">int</span></dt><dd><p>Step size for extending contour.</p>
</dd>
<dt><strong>zdir</strong><spanclass="classifier">{'x', 'y', 'z'}, default: 'z'</span></dt><dd><p>The direction to use.</p>
</dd>
<dt><strong>offset</strong><spanclass="classifier">float, optional</span></dt><dd><p>If specified, plot a projection of the contour lines at this
position in a plane normal to zdir.</p>
</dd>
<dt><strong>data</strong><spanclass="classifier">indexable object, optional</span></dt><dd><p>If given, all parameters also accept a string <codeclass="docutils literal notranslate"><spanclass="pre">s</span></code>, which is
interpreted as <codeclass="docutils literal notranslate"><spanclass="pre">data[s]</span></code> (unless this raises an exception).</p>
</dd>
<dt><strong>*args, **kwargs</strong></dt><dd><p>Other arguments are forwarded to <aclass="reference internal" href="../../api/_as_gen/matplotlib.axes.Axes.contour.html#matplotlib.axes.Axes.contour" title="matplotlib.axes.Axes.contour"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">matplotlib.axes.Axes.contour</span></code></a>.</p>
<spanclass="sig-prename descclassname"><spanclass="pre">Axes3D.</span></span><spanclass="sig-name descname"><spanclass="pre">contourf</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">X</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">Y</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">Z</span></span></em>, <emclass="sig-param"><spanclass="o"><spanclass="pre">*</span></span><spanclass="n"><spanclass="pre">args</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">zdir</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">'z'</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">offset</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">data</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="o"><spanclass="pre">**</span></span><spanclass="n"><spanclass="pre">kwargs</span></span></em><spanclass="sig-paren">)</span><aclass="reference external" href="https://github.com/matplotlib/matplotlib/blob/v3.5.2/lib/mpl_toolkits/mplot3d/axes3d.py#L2208-L2239"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink" href="#mpl_toolkits.mplot3d.Axes3D.contourf" title="Permalink to this definition">#</a></dt>
<dd><p>Create a 3D filled contour plot.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><dlclass="simple">
<dt><strong>X, Y, Z</strong><spanclass="classifier">array-like</span></dt><dd><p>Input data. See <aclass="reference internal" href="../../api/_as_gen/matplotlib.axes.Axes.contourf.html#matplotlib.axes.Axes.contourf" title="matplotlib.axes.Axes.contourf"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">contourf</span></code></a> for acceptable
data shapes.</p>
</dd>
<dt><strong>zdir</strong><spanclass="classifier">{'x', 'y', 'z'}, default: 'z'</span></dt><dd><p>The direction to use.</p>
</dd>
<dt><strong>offset</strong><spanclass="classifier">float, optional</span></dt><dd><p>If specified, plot a projection of the contour lines at this
position in a plane normal to zdir.</p>
</dd>
<dt><strong>data</strong><spanclass="classifier">indexable object, optional</span></dt><dd><p>If given, all parameters also accept a string <codeclass="docutils literal notranslate"><spanclass="pre">s</span></code>, which is
interpreted as <codeclass="docutils literal notranslate"><spanclass="pre">data[s]</span></code> (unless this raises an exception).</p>
</dd>
<dt><strong>*args, **kwargs</strong></dt><dd><p>Other arguments are forwarded to <aclass="reference internal" href="../../api/_as_gen/matplotlib.axes.Axes.contourf.html#matplotlib.axes.Axes.contourf" title="matplotlib.axes.Axes.contourf"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">matplotlib.axes.Axes.contourf</span></code></a>.</p>
<spanclass="sig-prename descclassname"><spanclass="pre">Axes3D.</span></span><spanclass="sig-name descname"><spanclass="pre">bar</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">left</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">height</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">zs</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">0</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">zdir</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">'z'</span></span></em>, <emclass="sig-param"><spanclass="o"><spanclass="pre">*</span></span><spanclass="n"><spanclass="pre">args</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">data</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="o"><spanclass="pre">**</span></span><spanclass="n"><spanclass="pre">kwargs</span></span></em><spanclass="sig-paren">)</span><aclass="reference external" href="https://github.com/matplotlib/matplotlib/blob/v3.5.2/lib/mpl_toolkits/mplot3d/axes3d.py#L2402-L2454"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink" href="#mpl_toolkits.mplot3d.Axes3D.bar" title="Permalink to this definition">#</a></dt>
<dd><p>Add 2D bar(s).</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><dlclass="simple">
<dt><strong>left</strong><spanclass="classifier">1D array-like</span></dt><dd><p>The x coordinates of the left sides of the bars.</p>
</dd>
<dt><strong>height</strong><spanclass="classifier">1D array-like</span></dt><dd><p>The height of the bars.</p>
</dd>
<dt><strong>zs</strong><spanclass="classifier">float or 1D array-like</span></dt><dd><p>Z coordinate of bars; if a single value is specified, it will be
used for all bars.</p>
</dd>
<dt><strong>zdir</strong><spanclass="classifier">{'x', 'y', 'z'}, default: 'z'</span></dt><dd><p>When plotting 2D data, the direction to use as z ('x', 'y' or 'z').</p>
</dd>
<dt><strong>data</strong><spanclass="classifier">indexable object, optional</span></dt><dd><p>If given, all parameters also accept a string <codeclass="docutils literal notranslate"><spanclass="pre">s</span></code>, which is
interpreted as <codeclass="docutils literal notranslate"><spanclass="pre">data[s]</span></code> (unless this raises an exception).</p>
</dd>
<dt><strong>**kwargs</strong></dt><dd><p>Other arguments are forwarded to <aclass="reference internal" href="../../api/_as_gen/matplotlib.axes.Axes.bar.html#matplotlib.axes.Axes.bar" title="matplotlib.axes.Axes.bar"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">matplotlib.axes.Axes.bar</span></code></a>.</p>
<p>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.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><dlclass="simple">
<dt><strong>X, Y, Z</strong><spanclass="classifier">array-like</span></dt><dd><p>The x, y and z coordinates of the arrow locations (default is
tail of arrow; see <em>pivot</em> kwarg).</p>
</dd>
<dt><strong>U, V, W</strong><spanclass="classifier">array-like</span></dt><dd><p>The x, y and z components of the arrow vectors.</p>
</dd>
<dt><strong>length</strong><spanclass="classifier">float, default: 1</span></dt><dd><p>The length of each quiver.</p>
</dd>
<dt><strong>arrow_length_ratio</strong><spanclass="classifier">float, default: 0.3</span></dt><dd><p>The ratio of the arrow head with respect to the quiver.</p>
</dd>
<dt><strong>pivot</strong><spanclass="classifier">{'tail', 'middle', 'tip'}, default: 'tail'</span></dt><dd><p>The part of the arrow that is at the grid point; the arrow
rotates about this point, hence the name <em>pivot</em>.</p>
</dd>
<dt><strong>normalize</strong><spanclass="classifier">bool, default: False</span></dt><dd><p>Whether all arrows are normalized to have the same length, or keep
the lengths defined by <em>u</em>, <em>v</em>, and <em>w</em>.</p>
</dd>
<dt><strong>data</strong><spanclass="classifier">indexable object, optional</span></dt><dd><p>If given, all parameters also accept a string <codeclass="docutils literal notranslate"><spanclass="pre">s</span></code>, which is
interpreted as <codeclass="docutils literal notranslate"><spanclass="pre">data[s]</span></code> (unless this raises an exception).</p>
</dd>
<dt><strong>**kwargs</strong></dt><dd><p>Any additional keyword arguments are delegated to