

.. _sphx_glr_gallery_images_contours_and_fields:

.. _images_contours_and_fields_examples:

Images, contours and fields
===========================



.. raw:: html

    <div class="sphx-glr-thumbnails">

.. thumbnail-parent-div-open

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip=" Prepending an affine transformation (`~.transforms.Affine2D`) to the data transform &lt;data-coords&gt; of an image allows to manipulate the image&#x27;s shape and orientation.  This is an example of the concept of transform chaining &lt;transformation-pipeline&gt;.">

.. only:: html

  .. image:: /gallery/images_contours_and_fields/images/thumb/sphx_glr_affine_image_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_images_contours_and_fields_affine_image.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Affine transform of an image</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Demonstration of wind barb plots.">

.. only:: html

  .. image:: /gallery/images_contours_and_fields/images/thumb/sphx_glr_barb_demo_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_images_contours_and_fields_barb_demo.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Wind barbs</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="The figure size is calculated so that the width in pixels is a multiple of the number of data points to prevent interpolation artifacts. Additionally, the Axes is defined to span the whole figure and all Axis are turned off.">

.. only:: html

  .. image:: /gallery/images_contours_and_fields/images/thumb/sphx_glr_barcode_demo_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_images_contours_and_fields_barcode_demo.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Barcode</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Demonstration of how a colorbar can be used to interactively adjust the range of colormapping on an image. To use the interactive feature, you must be in either zoom mode (magnifying glass toolbar button) or pan mode (4-way arrow toolbar button) and click inside the colorbar.">

.. only:: html

  .. image:: /gallery/images_contours_and_fields/images/thumb/sphx_glr_colormap_interactive_adjustment_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_images_contours_and_fields_colormap_interactive_adjustment.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Interactive adjustment of colormap range</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Demonstration of using norm to map colormaps onto data in non-linear ways.">

.. only:: html

  .. image:: /gallery/images_contours_and_fields/images/thumb/sphx_glr_colormap_normalizations_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_images_contours_and_fields_colormap_normalizations.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Colormap normalizations</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Demonstration of using norm to map colormaps onto data in non-linear ways.">

.. only:: html

  .. image:: /gallery/images_contours_and_fields/images/thumb/sphx_glr_colormap_normalizations_symlognorm_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_images_contours_and_fields_colormap_normalizations_symlognorm.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Colormap normalizations SymLogNorm</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Illustrate the difference between corner_mask=False and corner_mask=True for masked contour plots.  The default is controlled by contour.corner_mask.">

.. only:: html

  .. image:: /gallery/images_contours_and_fields/images/thumb/sphx_glr_contour_corner_mask_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_images_contours_and_fields_contour_corner_mask.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Contour corner mask</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Illustrate simple contour plotting, contours on an image with a colorbar for the contours, and labelled contours.">

.. only:: html

  .. image:: /gallery/images_contours_and_fields/images/thumb/sphx_glr_contour_demo_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_images_contours_and_fields_contour_demo.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Contour Demo</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Test combinations of contouring, filled contouring, and image plotting. For contour labelling, see also the contour demo example &lt;/gallery/images_contours_and_fields/contour_demo&gt;.">

.. only:: html

  .. image:: /gallery/images_contours_and_fields/images/thumb/sphx_glr_contour_image_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_images_contours_and_fields_contour_image.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Contour image</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Illustrate some of the more advanced things that one can do with contour labels.">

.. only:: html

  .. image:: /gallery/images_contours_and_fields/images/thumb/sphx_glr_contour_label_demo_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_images_contours_and_fields_contour_label_demo.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Contour Label Demo</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="How to use the axes.Axes.contourf method to create filled contour plots.">

.. only:: html

  .. image:: /gallery/images_contours_and_fields/images/thumb/sphx_glr_contourf_demo_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_images_contours_and_fields_contourf_demo.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Contourf demo</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Demo filled contour plots with hatched patterns.">

.. only:: html

  .. image:: /gallery/images_contours_and_fields/images/thumb/sphx_glr_contourf_hatching_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_images_contours_and_fields_contourf_hatching.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Contourf hatching</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Demonstrate use of a log color scale in contourf">

.. only:: html

  .. image:: /gallery/images_contours_and_fields/images/thumb/sphx_glr_contourf_log_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_images_contours_and_fields_contourf_log.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Contourf and log color scale</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Contour plotting is particularly handy when illustrating the solution space of optimization problems.  Not only can axes.Axes.contour be used to represent the topography of the objective function, it can be used to generate boundary curves of the constraint functions.  The constraint lines can be drawn with TickedStroke to distinguish the valid and invalid sides of the constraint boundaries.">

.. only:: html

  .. image:: /gallery/images_contours_and_fields/images/thumb/sphx_glr_contours_in_optimization_demo_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_images_contours_and_fields_contours_in_optimization_demo.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Contouring the solution space of optimizations</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="A BboxImage can be used to position an image according to a bounding box. This demo shows how to show an image inside a text.Text&#x27;s bounding box as well as how to manually create a bounding box for the image.">

.. only:: html

  .. image:: /gallery/images_contours_and_fields/images/thumb/sphx_glr_demo_bboximage_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_images_contours_and_fields_demo_bboximage.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">BboxImage Demo</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This illustrates placing images directly in the figure, with no Axes objects.">

.. only:: html

  .. image:: /gallery/images_contours_and_fields/images/thumb/sphx_glr_figimage_demo_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_images_contours_and_fields_figimage_demo.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Figimage Demo</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="It is often desirable to show data which depends on two independent variables as a color coded image plot. This is often referred to as a heatmap. If the data is categorical, this would be called a categorical heatmap.">

.. only:: html

  .. image:: /gallery/images_contours_and_fields/images/thumb/sphx_glr_image_annotated_heatmap_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_images_contours_and_fields_image_annotated_heatmap.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Annotated heatmap</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Images are represented by discrete pixels assigned color values, either on the screen or in an image file.  When a user calls imshow with a data array, it is rare that the size of the data array exactly matches the number of pixels allotted to the image in the figure, so Matplotlib resamples or scales the data or image to fit.  If the data array is larger than the number of pixels allotted in the rendered figure, then the image will be &quot;down-sampled&quot; and image information will be lost. Conversely, if the data array is smaller than the number of output pixels then each data point will get multiple pixels, and the image is &quot;up-sampled&quot;.">

.. only:: html

  .. image:: /gallery/images_contours_and_fields/images/thumb/sphx_glr_image_antialiasing_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_images_contours_and_fields_image_antialiasing.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Image resampling</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Demo of image that&#x27;s been clipped by a circular patch.">

.. only:: html

  .. image:: /gallery/images_contours_and_fields/images/thumb/sphx_glr_image_clip_path_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_images_contours_and_fields_image_clip_path.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Clipping images with patches</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="The most common way to plot images in Matplotlib is with imshow. The following examples demonstrate much of the functionality of imshow and the many images you can create.">

.. only:: html

  .. image:: /gallery/images_contours_and_fields/images/thumb/sphx_glr_image_demo_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_images_contours_and_fields_image_demo.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Many ways to plot images</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="imshow with masked array input and out-of-range colors.">

.. only:: html

  .. image:: /gallery/images_contours_and_fields/images/thumb/sphx_glr_image_masked_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_images_contours_and_fields_image_masked.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Image with masked values</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="NonUniformImage is a generalized image with pixels on a rectilinear grid, i.e. it allows rows and columns with individual heights / widths.">

.. only:: html

  .. image:: /gallery/images_contours_and_fields/images/thumb/sphx_glr_image_nonuniform_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_images_contours_and_fields_image_nonuniform.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Image nonuniform</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Blend transparency with color to highlight parts of data with imshow.">

.. only:: html

  .. image:: /gallery/images_contours_and_fields/images/thumb/sphx_glr_image_transparency_blend_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_images_contours_and_fields_image_transparency_blend.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Blend transparency with color in 2D images</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Modify the coordinate formatter to report the image &quot;z&quot; value of the nearest pixel given x and y.  This functionality is built in by default; this example just showcases how to customize the format_coord function.">

.. only:: html

  .. image:: /gallery/images_contours_and_fields/images/thumb/sphx_glr_image_zcoord_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_images_contours_and_fields_image_zcoord.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Modifying the coordinate formatter</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example displays the difference between interpolation methods for imshow.">

.. only:: html

  .. image:: /gallery/images_contours_and_fields/images/thumb/sphx_glr_interpolation_methods_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_images_contours_and_fields_interpolation_methods.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Interpolations for imshow</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Comparison of a contour plot of irregularly spaced data interpolated on a regular grid versus a tricontour plot for an unstructured triangular grid.">

.. only:: html

  .. image:: /gallery/images_contours_and_fields/images/thumb/sphx_glr_irregulardatagrid_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_images_contours_and_fields_irregulardatagrid.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Contour plot of irregularly spaced data</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Layer images above one another using alpha blending">

.. only:: html

  .. image:: /gallery/images_contours_and_fields/images/thumb/sphx_glr_layer_images_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_images_contours_and_fields_layer_images.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Layer images with alpha blending</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="matshow visualizes a 2D matrix or array as color-coded image.">

.. only:: html

  .. image:: /gallery/images_contours_and_fields/images/thumb/sphx_glr_matshow_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_images_contours_and_fields_matshow.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Visualize matrices with matshow</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Use a single colorbar for multiple images.">

.. only:: html

  .. image:: /gallery/images_contours_and_fields/images/thumb/sphx_glr_multi_image_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_images_contours_and_fields_multi_image.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Multiple images with one colorbar</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="pcolor generates 2D image-style plots, as illustrated below.">

.. only:: html

  .. image:: /gallery/images_contours_and_fields/images/thumb/sphx_glr_pcolor_demo_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_images_contours_and_fields_pcolor_demo.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">pcolor images</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="axes.Axes.pcolormesh and pcolor have a few options for how grids are laid out and the shading between the grid points.">

.. only:: html

  .. image:: /gallery/images_contours_and_fields/images/thumb/sphx_glr_pcolormesh_grids_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_images_contours_and_fields_pcolormesh_grids.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">pcolormesh grids and shading</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="axes.Axes.pcolormesh allows you to generate 2D image-style plots. Note that it is faster than the similar pcolor.">

.. only:: html

  .. image:: /gallery/images_contours_and_fields/images/thumb/sphx_glr_pcolormesh_levels_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_images_contours_and_fields_pcolormesh_levels.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">pcolormesh</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="A stream plot, or streamline plot, is used to display 2D vector fields. This example shows a few features of the streamplot function:">

.. only:: html

  .. image:: /gallery/images_contours_and_fields/images/thumb/sphx_glr_plot_streamplot_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_images_contours_and_fields_plot_streamplot.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Streamplot</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="pcolormesh uses a QuadMesh, a faster generalization of pcolor, but with some restrictions.">

.. only:: html

  .. image:: /gallery/images_contours_and_fields/images/thumb/sphx_glr_quadmesh_demo_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_images_contours_and_fields_quadmesh_demo.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">QuadMesh Demo</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Demonstrates some more advanced options for quiver.  For a simple example refer to /gallery/images_contours_and_fields/quiver_simple_demo.">

.. only:: html

  .. image:: /gallery/images_contours_and_fields/images/thumb/sphx_glr_quiver_demo_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_images_contours_and_fields_quiver_demo.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Advanced quiver and quiverkey functions</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="A simple example of a quiver plot with a quiverkey.">

.. only:: html

  .. image:: /gallery/images_contours_and_fields/images/thumb/sphx_glr_quiver_simple_demo_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_images_contours_and_fields_quiver_simple_demo.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Quiver Simple Demo</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Example showing how to make shaded relief plots like Mathematica_ or `Generic Mapping Tools`_.">

.. only:: html

  .. image:: /gallery/images_contours_and_fields/images/thumb/sphx_glr_shading_example_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_images_contours_and_fields_shading_example.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Shading example</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Plotting a spectrogram using specgram.">

.. only:: html

  .. image:: /gallery/images_contours_and_fields/images/thumb/sphx_glr_specgram_demo_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_images_contours_and_fields_specgram_demo.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Spectrogram</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Plot the sparsity pattern of arrays.">

.. only:: html

  .. image:: /gallery/images_contours_and_fields/images/thumb/sphx_glr_spy_demos_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_images_contours_and_fields_spy_demos.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Spy Demos</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Contour plots of unstructured triangular grids.">

.. only:: html

  .. image:: /gallery/images_contours_and_fields/images/thumb/sphx_glr_tricontour_demo_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_images_contours_and_fields_tricontour_demo.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Tricontour Demo</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Demonstrates high-resolution tricontouring of a random set of points; a matplotlib.tri.TriAnalyzer is used to improve the plot quality.">

.. only:: html

  .. image:: /gallery/images_contours_and_fields/images/thumb/sphx_glr_tricontour_smooth_delaunay_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_images_contours_and_fields_tricontour_smooth_delaunay.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Tricontour Smooth Delaunay</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Demonstrates high-resolution tricontouring on user-defined triangular grids with matplotlib.tri.UniformTriRefiner.">

.. only:: html

  .. image:: /gallery/images_contours_and_fields/images/thumb/sphx_glr_tricontour_smooth_user_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_images_contours_and_fields_tricontour_smooth_user.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Tricontour Smooth User</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Demonstrates computation of gradient with matplotlib.tri.CubicTriInterpolator.">

.. only:: html

  .. image:: /gallery/images_contours_and_fields/images/thumb/sphx_glr_trigradient_demo_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_images_contours_and_fields_trigradient_demo.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Trigradient Demo</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Interpolation from triangular grid to quad grid.">

.. only:: html

  .. image:: /gallery/images_contours_and_fields/images/thumb/sphx_glr_triinterp_demo_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_images_contours_and_fields_triinterp_demo.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Triinterp Demo</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Pseudocolor plots of unstructured triangular grids.">

.. only:: html

  .. image:: /gallery/images_contours_and_fields/images/thumb/sphx_glr_tripcolor_demo_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_images_contours_and_fields_tripcolor_demo.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Tripcolor Demo</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Creating and plotting unstructured triangular grids.">

.. only:: html

  .. image:: /gallery/images_contours_and_fields/images/thumb/sphx_glr_triplot_demo_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_images_contours_and_fields_triplot_demo.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Triplot Demo</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Overlay an image on a plot by moving it to the front (``zorder=3``) and making it semi-transparent (``alpha=0.7``).">

.. only:: html

  .. image:: /gallery/images_contours_and_fields/images/thumb/sphx_glr_watermark_image_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_images_contours_and_fields_watermark_image.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Watermark image</div>
    </div>


.. thumbnail-parent-div-close

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /gallery/images_contours_and_fields/affine_image
   /gallery/images_contours_and_fields/barb_demo
   /gallery/images_contours_and_fields/barcode_demo
   /gallery/images_contours_and_fields/colormap_interactive_adjustment
   /gallery/images_contours_and_fields/colormap_normalizations
   /gallery/images_contours_and_fields/colormap_normalizations_symlognorm
   /gallery/images_contours_and_fields/contour_corner_mask
   /gallery/images_contours_and_fields/contour_demo
   /gallery/images_contours_and_fields/contour_image
   /gallery/images_contours_and_fields/contour_label_demo
   /gallery/images_contours_and_fields/contourf_demo
   /gallery/images_contours_and_fields/contourf_hatching
   /gallery/images_contours_and_fields/contourf_log
   /gallery/images_contours_and_fields/contours_in_optimization_demo
   /gallery/images_contours_and_fields/demo_bboximage
   /gallery/images_contours_and_fields/figimage_demo
   /gallery/images_contours_and_fields/image_annotated_heatmap
   /gallery/images_contours_and_fields/image_antialiasing
   /gallery/images_contours_and_fields/image_clip_path
   /gallery/images_contours_and_fields/image_demo
   /gallery/images_contours_and_fields/image_masked
   /gallery/images_contours_and_fields/image_nonuniform
   /gallery/images_contours_and_fields/image_transparency_blend
   /gallery/images_contours_and_fields/image_zcoord
   /gallery/images_contours_and_fields/interpolation_methods
   /gallery/images_contours_and_fields/irregulardatagrid
   /gallery/images_contours_and_fields/layer_images
   /gallery/images_contours_and_fields/matshow
   /gallery/images_contours_and_fields/multi_image
   /gallery/images_contours_and_fields/pcolor_demo
   /gallery/images_contours_and_fields/pcolormesh_grids
   /gallery/images_contours_and_fields/pcolormesh_levels
   /gallery/images_contours_and_fields/plot_streamplot
   /gallery/images_contours_and_fields/quadmesh_demo
   /gallery/images_contours_and_fields/quiver_demo
   /gallery/images_contours_and_fields/quiver_simple_demo
   /gallery/images_contours_and_fields/shading_example
   /gallery/images_contours_and_fields/specgram_demo
   /gallery/images_contours_and_fields/spy_demos
   /gallery/images_contours_and_fields/tricontour_demo
   /gallery/images_contours_and_fields/tricontour_smooth_delaunay
   /gallery/images_contours_and_fields/tricontour_smooth_user
   /gallery/images_contours_and_fields/trigradient_demo
   /gallery/images_contours_and_fields/triinterp_demo
   /gallery/images_contours_and_fields/tripcolor_demo
   /gallery/images_contours_and_fields/triplot_demo
   /gallery/images_contours_and_fields/watermark_image

