<divid="unreleased-message"> You are reading an old version of the documentation (v3.0.3). For the latest version see <ahref="https://matplotlib.org/stable/api/image_api.html">https://matplotlib.org/stable/api/image_api.html</a></div>
<codeclass="descname">get_cursor_data</code><spanclass="sig-paren">(</span><em>event</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/image.html#AxesImage.get_cursor_data"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.image.AxesImage.get_cursor_data" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the cursor data for a given event</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.image.AxesImage.get_extent">
<codeclass="descname">get_extent</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/image.html#AxesImage.get_extent"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.image.AxesImage.get_extent" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the image extent: left, right, bottom, top</p>
<codeclass="descname">get_window_extent</code><spanclass="sig-paren">(</span><em>renderer=None</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/image.html#AxesImage.get_window_extent"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.image.AxesImage.get_window_extent" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the axes bounding box in display space.
Subclasses should override for inclusion in the bounding box
"tight" calculation. Default is to return an empty bounding
box at 0, 0.</p>
<p>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.</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.image.AxesImage.make_image">
<codeclass="descname">make_image</code><spanclass="sig-paren">(</span><em>renderer</em>, <em>magnification=1.0</em>, <em>unsampled=False</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/image.html#AxesImage.make_image"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.image.AxesImage.make_image" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="method">
<dtid="matplotlib.image.AxesImage.set_extent">
<codeclass="descname">set_extent</code><spanclass="sig-paren">(</span><em>extent</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/image.html#AxesImage.set_extent"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.image.AxesImage.set_extent" title="Permalink to this definition">¶</a></dt>
<dd><p>extent is data axes (left, right, bottom, top) for making image plots</p>
<p>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.</p>
</dd></dl>
</dd></dl>
<dlclass="class">
<dtid="matplotlib.image.BboxImage">
<emclass="property">class </em><codeclass="descclassname">matplotlib.image.</code><codeclass="descname">BboxImage</code><spanclass="sig-paren">(</span><em>bbox</em>, <em>cmap=None</em>, <em>norm=None</em>, <em>interpolation=None</em>, <em>origin=None</em>, <em>filternorm=1</em>, <em>filterrad=4.0</em>, <em>resample=False</em>, <em>interp_at_native=True</em>, <em>**kwargs</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/image.html#BboxImage"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.image.BboxImage" title="Permalink to this definition">¶</a></dt>
<p>The Image class whose size is determined by the given bbox.</p>
<p>cmap is a colors.Colormap instance
norm is a colors.Normalize instance to map luminance to 0-1</p>
<p>interp_at_native is a flag that determines whether or not
interpolation should still be applied when the image is
displayed at its native resolution. A common use case for this
is when displaying an image for annotational purposes; it is
treated similarly to Photoshop (interpolation is only used when
displaying the image at non-native resolutions).</p>
<p>kwargs are an optional list of Artist keyword args</p>
<dlclass="method">
<dtid="matplotlib.image.BboxImage.contains">
<codeclass="descname">contains</code><spanclass="sig-paren">(</span><em>mouseevent</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/image.html#BboxImage.contains"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.image.BboxImage.contains" title="Permalink to this definition">¶</a></dt>
<dd><p>Test whether the mouse event occurred within the image.</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.image.BboxImage.get_transform">
<codeclass="descname">get_transform</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/image.html#BboxImage.get_transform"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.image.BboxImage.get_transform" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_window_extent</code><spanclass="sig-paren">(</span><em>renderer=None</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/image.html#BboxImage.get_window_extent"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.image.BboxImage.get_window_extent" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the axes bounding box in display space.
Subclasses should override for inclusion in the bounding box
"tight" calculation. Default is to return an empty bounding
box at 0, 0.</p>
<p>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.</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.image.BboxImage.make_image">
<codeclass="descname">make_image</code><spanclass="sig-paren">(</span><em>renderer</em>, <em>magnification=1.0</em>, <em>unsampled=False</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/image.html#BboxImage.make_image"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.image.BboxImage.make_image" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dlclass="class">
<dtid="matplotlib.image.FigureImage">
<emclass="property">class </em><codeclass="descclassname">matplotlib.image.</code><codeclass="descname">FigureImage</code><spanclass="sig-paren">(</span><em>fig</em>, <em>cmap=None</em>, <em>norm=None</em>, <em>offsetx=0</em>, <em>offsety=0</em>, <em>origin=None</em>, <em>**kwargs</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/image.html#FigureImage"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.image.FigureImage" title="Permalink to this definition">¶</a></dt>
norm is a colors.Normalize instance to map luminance to 0-1</p>
<p>kwargs are an optional list of Artist keyword args</p>
<dlclass="method">
<dtid="matplotlib.image.FigureImage.get_extent">
<codeclass="descname">get_extent</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/image.html#FigureImage.get_extent"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.image.FigureImage.get_extent" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the image extent: left, right, bottom, top</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.image.FigureImage.make_image">
<codeclass="descname">make_image</code><spanclass="sig-paren">(</span><em>renderer</em>, <em>magnification=1.0</em>, <em>unsampled=False</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/image.html#FigureImage.make_image"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.image.FigureImage.make_image" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="method">
<dtid="matplotlib.image.FigureImage.set_data">
<codeclass="descname">set_data</code><spanclass="sig-paren">(</span><em>A</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/image.html#FigureImage.set_data"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.image.FigureImage.set_data" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the image array.</p>
</dd></dl>
<dlclass="attribute">
<dtid="matplotlib.image.FigureImage.zorder">
<codeclass="descname">zorder</code><emclass="property"> = 0</em><aclass="headerlink" href="#matplotlib.image.FigureImage.zorder" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dlclass="class">
<dtid="matplotlib.image.NonUniformImage">
<emclass="property">class </em><codeclass="descclassname">matplotlib.image.</code><codeclass="descname">NonUniformImage</code><spanclass="sig-paren">(</span><em>ax</em>, <em>*</em>, <em>interpolation='nearest'</em>, <em>**kwargs</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/image.html#NonUniformImage"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.image.NonUniformImage" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_extent</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/image.html#NonUniformImage.get_extent"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.image.NonUniformImage.get_extent" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the image extent: left, right, bottom, top</p>
<codeclass="descname">make_image</code><spanclass="sig-paren">(</span><em>renderer</em>, <em>magnification=1.0</em>, <em>unsampled=False</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/image.html#NonUniformImage.make_image"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.image.NonUniformImage.make_image" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">set_array</code><spanclass="sig-paren">(</span><em>*args</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/image.html#NonUniformImage.set_array"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.image.NonUniformImage.set_array" title="Permalink to this definition">¶</a></dt>
<dd><p>Retained for backwards compatibility - use set_data instead.</p>
<codeclass="descname">set_cmap</code><spanclass="sig-paren">(</span><em>cmap</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/image.html#NonUniformImage.set_cmap"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.image.NonUniformImage.set_cmap" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">set_data</code><spanclass="sig-paren">(</span><em>x</em>, <em>y</em>, <em>A</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/image.html#NonUniformImage.set_data"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.image.NonUniformImage.set_data" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the grid for the pixel centers, and the pixel values.</p>
<blockquote>
<div><dlclass="docutils">
<dt><em>x</em> and <em>y</em> are monotonic 1-D ndarrays of lengths N and M,</dt>
<dd>respectively, specifying pixel centers</dd>
<dt><em>A</em> is an (M,N) ndarray or masked array of values to be</dt>
<dd>colormapped, or a (M,N,3) RGB array, or a (M,N,4) RGBA
<codeclass="descname">set_filternorm</code><spanclass="sig-paren">(</span><em>s</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/image.html#NonUniformImage.set_filternorm"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.image.NonUniformImage.set_filternorm" title="Permalink to this definition">¶</a></dt>
<dd><p>Set whether the resize filter normalizes the weights.</p>
<p>See help for <aclass="reference internal" href="_as_gen/matplotlib.axes.Axes.imshow.html#matplotlib.axes.Axes.imshow" title="matplotlib.axes.Axes.imshow"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">imshow</span></code></a>.</p>
<codeclass="descname">set_filterrad</code><spanclass="sig-paren">(</span><em>s</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/image.html#NonUniformImage.set_filterrad"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.image.NonUniformImage.set_filterrad" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the resize filter radius only applicable to some
<codeclass="descname">set_interpolation</code><spanclass="sig-paren">(</span><em>s</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/image.html#NonUniformImage.set_interpolation"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.image.NonUniformImage.set_interpolation" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">set_norm</code><spanclass="sig-paren">(</span><em>norm</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/image.html#NonUniformImage.set_norm"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.image.NonUniformImage.set_norm" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_cursor_data</code><spanclass="sig-paren">(</span><em>event</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/image.html#PcolorImage.get_cursor_data"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.image.PcolorImage.get_cursor_data" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the cursor data for a given event</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.image.PcolorImage.make_image">
<codeclass="descname">make_image</code><spanclass="sig-paren">(</span><em>renderer</em>, <em>magnification=1.0</em>, <em>unsampled=False</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/image.html#PcolorImage.make_image"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.image.PcolorImage.make_image" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="method">
<dtid="matplotlib.image.PcolorImage.set_array">
<codeclass="descname">set_array</code><spanclass="sig-paren">(</span><em>*args</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/image.html#PcolorImage.set_array"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.image.PcolorImage.set_array" title="Permalink to this definition">¶</a></dt>
<dd><p>Retained for backwards compatibility - use set_data instead.</p>
<codeclass="descname">set_data</code><spanclass="sig-paren">(</span><em>x</em>, <em>y</em>, <em>A</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/image.html#PcolorImage.set_data"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.image.PcolorImage.set_data" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the grid for the rectangle boundaries, and the data values.</p>
<blockquote>
<div><dlclass="docutils">
<dt><em>x</em> and <em>y</em> are monotonic 1-D ndarrays of lengths N+1 and M+1,</dt>
<dd>respectively, specifying rectangle boundaries. If None,
they will be created as uniform arrays from 0 through N
and 0 through M, respectively.</dd>
<dt><em>A</em> is an (M,N) ndarray or masked array of values to be</dt>
<dd>colormapped, or a (M,N,3) RGB array, or a (M,N,4) RGBA
array.</dd>
</dl>
</div></blockquote>
</dd></dl>
</dd></dl>
<dlclass="function">
<dtid="matplotlib.image.composite_images">
<codeclass="descclassname">matplotlib.image.</code><codeclass="descname">composite_images</code><spanclass="sig-paren">(</span><em>images</em>, <em>renderer</em>, <em>magnification=1.0</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/image.html#composite_images"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.image.composite_images" title="Permalink to this definition">¶</a></dt>
<dd><p>Composite a number of RGBA images into one. The images are
composited in the order in which they appear in the <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">images</span></code> list.</p>
<dt><strong>images</strong><spanclass="classifier-delimiter">:</span><spanclass="classifier">list of Images</span></dt>
<dd><pclass="first last">Each must have a <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">make_image</span></code> method. For each image,
<codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">can_composite</span></code> should return <aclass="reference external" href="https://docs.python.org/3/library/constants.html#True" title="(in Python v3.7)"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">True</span></code></a>, though this is not
enforced by this function. Each image must have a purely
<li>image: A numpy array of the same type as the input images.</li>
<li>offset_x, offset_y: The offset of the image (left, bottom)
in the output figure.</li>
</ul>
</dd>
</dl>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dlclass="function">
<dtid="matplotlib.image.imread">
<codeclass="descclassname">matplotlib.image.</code><codeclass="descname">imread</code><spanclass="sig-paren">(</span><em>fname</em>, <em>format=None</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/image.html#imread"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.image.imread" title="Permalink to this definition">¶</a></dt>
<dd><p>Read an image from a file into an array.</p>
<dd><pclass="first last">Indicates whether the <codeclass="docutils literal notranslate"><spanclass="pre">(0,</span><spanclass="pre">0)</span></code> index of the array is in the upper
left or lower left corner of the axes. Defaults to <codeclass="docutils literal notranslate"><aclass="reference external" href="../tutorials/introductory/customizing.html#matplotlib-rcparams"><spanclass="pre">rcParams["image.origin"]</span></a></code>
<dd><pclass="first last">The DPI to store in the metadata of the file. This does not affect the
resolution of the output image.</p>
</dd>
</dl>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dlclass="function">
<dtid="matplotlib.image.pil_to_array">
<codeclass="descclassname">matplotlib.image.</code><codeclass="descname">pil_to_array</code><spanclass="sig-paren">(</span><em>pilImage</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/image.html#pil_to_array"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.image.pil_to_array" title="Permalink to this definition">¶</a></dt>
<dd><p>Load a <aclass="reference external" href="https://pillow.readthedocs.io/en/latest/reference/Image.html">PIL image</a> and return it as a numpy array.</p>
<dt><strong>infile</strong><spanclass="classifier-delimiter">:</span><spanclass="classifier">str or file-like</span></dt>
<dd><pclass="first last">The image file -- must be PNG, Pillow-readable if you have <aclass="reference external" href="http://python-pillow.org/">Pillow</a> installed.</p>
</dd>
<dt><strong>thumbfile</strong><spanclass="classifier-delimiter">:</span><spanclass="classifier">str or file-like</span></dt>
<dd><pclass="first last">The interpolation scheme used in the resampling. See the
<em>interpolation</em> parameter of <aclass="reference internal" href="_as_gen/matplotlib.axes.Axes.imshow.html#matplotlib.axes.Axes.imshow" title="matplotlib.axes.Axes.imshow"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">imshow</span></code></a> for possible values.</p>
<dd><pclass="first last">If True, the default backend (presumably a user interface
backend) will be used which will cause a figure to be raised if
<aclass="reference internal" href="_as_gen/matplotlib.pyplot.show.html#matplotlib.pyplot.show" title="matplotlib.pyplot.show"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">show</span></code></a> is called. If it is False, the figure is
created using <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">FigureCanvasBase</span></code> and the drawing backend is selected
as <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">savefig</span></code> would normally do.</p>
</dd>
</dl>
</td>
</tr>
<trclass="field-even field"><thclass="field-name">Returns:</th><tdclass="field-body"><dlclass="first last docutils">