image imagewidth (px) 75 2.22k | code stringlengths 300 16.2k | example_id stringlengths 28 79 | figure_index int64 0 26 | figure_name stringclasses 28
values | title stringlengths 38 94 | example_page_url stringlengths 61 195 | source_url stringlengths 80 111 | source_relpath stringlengths 6 37 | category_hint stringclasses 24
values | status stringclasses 1
value | num_figures int64 1 27 | error null |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
"""
===================
Contour corner mask
===================
Illustrate the difference between ``corner_mask=False`` and
``corner_mask=True`` for masked contour plots. The default is controlled by
:rc:`contour.corner_mask`.
"""
import matplotlib.pyplot as plt
import numpy as np
# Data to plot.
x, y = np.meshgrid... | stable__gallery__images_contours_and_fields__contour_corner_mask | 0 | figure_000.png | Contour corner mask — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/contour_corner_mask.html#sphx-glr-download-gallery-images-contours-and-fields-contour-corner-mask-py | https://matplotlib.org/stable/_downloads/fbb6e9cece4e0795d669b7ba3bbb3495/contour_corner_mask.py | contour_corner_mask.py | images_contours_and_fields | ok | 1 | null | |
"""
============
Contour Demo
============
Illustrate simple contour plotting, contours on an image with
a colorbar for the contours, and labelled contours.
See also the :doc:`contour image example
</gallery/images_contours_and_fields/contour_image>`.
"""
import matplotlib.pyplot as plt
import numpy as np
import ma... | stable__gallery__images_contours_and_fields__contour_demo | 0 | figure_000.png | Contour Demo — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/contour_demo.html#sphx-glr-download-gallery-images-contours-and-fields-contour-demo-py | https://matplotlib.org/stable/_downloads/f1ae4d59ecd3898684380f6391e3c42c/contour_demo.py | contour_demo.py | images_contours_and_fields | ok | 6 | null | |
"""
============
Contour Demo
============
Illustrate simple contour plotting, contours on an image with
a colorbar for the contours, and labelled contours.
See also the :doc:`contour image example
</gallery/images_contours_and_fields/contour_image>`.
"""
import matplotlib.pyplot as plt
import numpy as np
import ma... | stable__gallery__images_contours_and_fields__contour_demo | 1 | figure_001.png | Contour Demo — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/contour_demo.html#sphx-glr-download-gallery-images-contours-and-fields-contour-demo-py | https://matplotlib.org/stable/_downloads/f1ae4d59ecd3898684380f6391e3c42c/contour_demo.py | contour_demo.py | images_contours_and_fields | ok | 6 | null | |
"""
============
Contour Demo
============
Illustrate simple contour plotting, contours on an image with
a colorbar for the contours, and labelled contours.
See also the :doc:`contour image example
</gallery/images_contours_and_fields/contour_image>`.
"""
import matplotlib.pyplot as plt
import numpy as np
import ma... | stable__gallery__images_contours_and_fields__contour_demo | 2 | figure_002.png | Contour Demo — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/contour_demo.html#sphx-glr-download-gallery-images-contours-and-fields-contour-demo-py | https://matplotlib.org/stable/_downloads/f1ae4d59ecd3898684380f6391e3c42c/contour_demo.py | contour_demo.py | images_contours_and_fields | ok | 6 | null | |
"""
============
Contour Demo
============
Illustrate simple contour plotting, contours on an image with
a colorbar for the contours, and labelled contours.
See also the :doc:`contour image example
</gallery/images_contours_and_fields/contour_image>`.
"""
import matplotlib.pyplot as plt
import numpy as np
import ma... | stable__gallery__images_contours_and_fields__contour_demo | 3 | figure_003.png | Contour Demo — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/contour_demo.html#sphx-glr-download-gallery-images-contours-and-fields-contour-demo-py | https://matplotlib.org/stable/_downloads/f1ae4d59ecd3898684380f6391e3c42c/contour_demo.py | contour_demo.py | images_contours_and_fields | ok | 6 | null | |
"""
============
Contour Demo
============
Illustrate simple contour plotting, contours on an image with
a colorbar for the contours, and labelled contours.
See also the :doc:`contour image example
</gallery/images_contours_and_fields/contour_image>`.
"""
import matplotlib.pyplot as plt
import numpy as np
import ma... | stable__gallery__images_contours_and_fields__contour_demo | 4 | figure_004.png | Contour Demo — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/contour_demo.html#sphx-glr-download-gallery-images-contours-and-fields-contour-demo-py | https://matplotlib.org/stable/_downloads/f1ae4d59ecd3898684380f6391e3c42c/contour_demo.py | contour_demo.py | images_contours_and_fields | ok | 6 | null | |
"""
============
Contour Demo
============
Illustrate simple contour plotting, contours on an image with
a colorbar for the contours, and labelled contours.
See also the :doc:`contour image example
</gallery/images_contours_and_fields/contour_image>`.
"""
import matplotlib.pyplot as plt
import numpy as np
import ma... | stable__gallery__images_contours_and_fields__contour_demo | 5 | figure_005.png | Contour Demo — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/contour_demo.html#sphx-glr-download-gallery-images-contours-and-fields-contour-demo-py | https://matplotlib.org/stable/_downloads/f1ae4d59ecd3898684380f6391e3c42c/contour_demo.py | contour_demo.py | images_contours_and_fields | ok | 6 | null | |
"""
=============
Contour image
=============
Test combinations of contouring, filled contouring, and image plotting.
For contour labelling, see also the :doc:`contour demo example
</gallery/images_contours_and_fields/contour_demo>`.
The emphasis in this demo is on showing how to make contours register
correctly on i... | stable__gallery__images_contours_and_fields__contour_image | 0 | figure_000.png | Contour image — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/contour_image.html#sphx-glr-download-gallery-images-contours-and-fields-contour-image-py | https://matplotlib.org/stable/_downloads/f1b1499ed8a765a5e00f7f294d269903/contour_image.py | contour_image.py | images_contours_and_fields | ok | 1 | null | |
"""
==================
Contour Label Demo
==================
Illustrate some of the more advanced things that one can do with
contour labels.
See also the :doc:`contour demo example
</gallery/images_contours_and_fields/contour_demo>`.
"""
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.ticker a... | stable__gallery__images_contours_and_fields__contour_label_demo | 0 | figure_000.png | Contour Label Demo — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/contour_label_demo.html#sphx-glr-download-gallery-images-contours-and-fields-contour-label-demo-py | https://matplotlib.org/stable/_downloads/aad94dfade69ead9a77cbfaa5cfddd61/contour_label_demo.py | contour_label_demo.py | images_contours_and_fields | ok | 3 | null | |
"""
==================
Contour Label Demo
==================
Illustrate some of the more advanced things that one can do with
contour labels.
See also the :doc:`contour demo example
</gallery/images_contours_and_fields/contour_demo>`.
"""
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.ticker a... | stable__gallery__images_contours_and_fields__contour_label_demo | 1 | figure_001.png | Contour Label Demo — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/contour_label_demo.html#sphx-glr-download-gallery-images-contours-and-fields-contour-label-demo-py | https://matplotlib.org/stable/_downloads/aad94dfade69ead9a77cbfaa5cfddd61/contour_label_demo.py | contour_label_demo.py | images_contours_and_fields | ok | 3 | null | |
"""
==================
Contour Label Demo
==================
Illustrate some of the more advanced things that one can do with
contour labels.
See also the :doc:`contour demo example
</gallery/images_contours_and_fields/contour_demo>`.
"""
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.ticker a... | stable__gallery__images_contours_and_fields__contour_label_demo | 2 | figure_002.png | Contour Label Demo — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/contour_label_demo.html#sphx-glr-download-gallery-images-contours-and-fields-contour-label-demo-py | https://matplotlib.org/stable/_downloads/aad94dfade69ead9a77cbfaa5cfddd61/contour_label_demo.py | contour_label_demo.py | images_contours_and_fields | ok | 3 | null | |
"""
=============
Contourf demo
=============
How to use the `.axes.Axes.contourf` method to create filled contour plots.
"""
import matplotlib.pyplot as plt
import numpy as np
delta = 0.025
x = y = np.arange(-3.0, 3.01, delta)
X, Y = np.meshgrid(x, y)
Z1 = np.exp(-X**2 - Y**2)
Z2 = np.exp(-(X - 1)**2 - (Y - 1)**2)
... | stable__gallery__images_contours_and_fields__contourf_demo | 0 | figure_000.png | Contourf demo — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/contourf_demo.html#sphx-glr-download-gallery-images-contours-and-fields-contourf-demo-py | https://matplotlib.org/stable/_downloads/56e51f9906e5b6bcd0521284660f9a3d/contourf_demo.py | contourf_demo.py | images_contours_and_fields | ok | 4 | null | |
"""
=============
Contourf demo
=============
How to use the `.axes.Axes.contourf` method to create filled contour plots.
"""
import matplotlib.pyplot as plt
import numpy as np
delta = 0.025
x = y = np.arange(-3.0, 3.01, delta)
X, Y = np.meshgrid(x, y)
Z1 = np.exp(-X**2 - Y**2)
Z2 = np.exp(-(X - 1)**2 - (Y - 1)**2)
... | stable__gallery__images_contours_and_fields__contourf_demo | 1 | figure_001.png | Contourf demo — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/contourf_demo.html#sphx-glr-download-gallery-images-contours-and-fields-contourf-demo-py | https://matplotlib.org/stable/_downloads/56e51f9906e5b6bcd0521284660f9a3d/contourf_demo.py | contourf_demo.py | images_contours_and_fields | ok | 4 | null | |
"""
=============
Contourf demo
=============
How to use the `.axes.Axes.contourf` method to create filled contour plots.
"""
import matplotlib.pyplot as plt
import numpy as np
delta = 0.025
x = y = np.arange(-3.0, 3.01, delta)
X, Y = np.meshgrid(x, y)
Z1 = np.exp(-X**2 - Y**2)
Z2 = np.exp(-(X - 1)**2 - (Y - 1)**2)
... | stable__gallery__images_contours_and_fields__contourf_demo | 2 | figure_002.png | Contourf demo — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/contourf_demo.html#sphx-glr-download-gallery-images-contours-and-fields-contourf-demo-py | https://matplotlib.org/stable/_downloads/56e51f9906e5b6bcd0521284660f9a3d/contourf_demo.py | contourf_demo.py | images_contours_and_fields | ok | 4 | null | |
"""
=================
Contourf hatching
=================
Demo filled contour plots with hatched patterns.
"""
import matplotlib.pyplot as plt
import numpy as np
# invent some numbers, turning the x and y arrays into simple
# 2d arrays, which make combining them together easier.
x = np.linspace(-3, 5, 150).reshape(1,... | stable__gallery__images_contours_and_fields__contourf_hatching | 0 | figure_000.png | Contourf hatching — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/contourf_hatching.html#sphx-glr-download-gallery-images-contours-and-fields-contourf-hatching-py | https://matplotlib.org/stable/_downloads/7cce118215208459709254a02dc09d69/contourf_hatching.py | contourf_hatching.py | images_contours_and_fields | ok | 2 | null | |
"""
=================
Contourf hatching
=================
Demo filled contour plots with hatched patterns.
"""
import matplotlib.pyplot as plt
import numpy as np
# invent some numbers, turning the x and y arrays into simple
# 2d arrays, which make combining them together easier.
x = np.linspace(-3, 5, 150).reshape(1,... | stable__gallery__images_contours_and_fields__contourf_hatching | 1 | figure_001.png | Contourf hatching — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/contourf_hatching.html#sphx-glr-download-gallery-images-contours-and-fields-contourf-hatching-py | https://matplotlib.org/stable/_downloads/7cce118215208459709254a02dc09d69/contourf_hatching.py | contourf_hatching.py | images_contours_and_fields | ok | 2 | null | |
"""
============================
Contourf and log color scale
============================
Demonstrate use of a log color scale in contourf
"""
import matplotlib.pyplot as plt
import numpy as np
from numpy import ma
from matplotlib import cm, ticker
N = 100
x = np.linspace(-3.0, 3.0, N)
y = np.linspace(-2.0, 2.0, N... | stable__gallery__images_contours_and_fields__contourf_log | 0 | figure_000.png | Contourf and log color scale — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/contourf_log.html#sphx-glr-download-gallery-images-contours-and-fields-contourf-log-py | https://matplotlib.org/stable/_downloads/bdf1327bcdd8760e8c91d7fc29b81b8e/contourf_log.py | contourf_log.py | images_contours_and_fields | ok | 1 | null | |
"""
==============================================
Contouring the solution space of optimizations
==============================================
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 o... | stable__gallery__images_contours_and_fields__contours_in_optimization_demo | 0 | figure_000.png | Contouring the solution space of optimizations — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/contours_in_optimization_demo.html#sphx-glr-download-gallery-images-contours-and-fields-contours-in-optimization-demo-py | https://matplotlib.org/stable/_downloads/1218cd5e94040ae915edce0c78b0043b/contours_in_optimization_demo.py | contours_in_optimization_demo.py | images_contours_and_fields | ok | 1 | null | |
"""
==============
BboxImage Demo
==============
A `~matplotlib.image.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`'s
bounding box as well as how to manually create a bounding box for the image.
"""
import matplotlib.pyplot as plt
i... | stable__gallery__images_contours_and_fields__demo_bboximage | 0 | figure_000.png | BboxImage Demo — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/demo_bboximage.html#sphx-glr-download-gallery-images-contours-and-fields-demo-bboximage-py | https://matplotlib.org/stable/_downloads/ee266dc4f781adee6f25e7723fd7089c/demo_bboximage.py | demo_bboximage.py | images_contours_and_fields | ok | 1 | null | |
"""
=============
Figimage Demo
=============
This illustrates placing images directly in the figure, with no Axes objects.
"""
import matplotlib.pyplot as plt
import numpy as np
fig = plt.figure()
Z = np.arange(10000).reshape((100, 100))
Z[:, 50:] = 1
im1 = fig.figimage(Z, xo=50, yo=0, origin='lower')
im2 = fig.fi... | stable__gallery__images_contours_and_fields__figimage_demo | 0 | figure_000.png | Figimage Demo — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/figimage_demo.html#sphx-glr-download-gallery-images-contours-and-fields-figimage-demo-py | https://matplotlib.org/stable/_downloads/a9fbced66a5ecdb68b4c5d20b95845bf/figimage_demo.py | figimage_demo.py | images_contours_and_fields | ok | 1 | null | |
"""
=================
Annotated heatmap
=================
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.
Matplotlib's `~matplotlib.axes.Axes.imsho... | stable__gallery__images_contours_and_fields__image_annotated_heatmap | 0 | figure_000.png | Annotated heatmap — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/image_annotated_heatmap.html#using-the-helper-function-code-style | https://matplotlib.org/stable/_downloads/9d9e065de89f1666f743d014a09fc0b4/image_annotated_heatmap.py | image_annotated_heatmap.py | images_contours_and_fields | ok | 3 | null | |
"""
================
Image resampling
================
Images are represented by discrete pixels assigned color values, either on the
screen or in an image file. When a user calls `~.Axes.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 i... | stable__gallery__images_contours_and_fields__image_antialiasing | 0 | figure_000.png | Image resampling — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/image_antialiasing.html#up-sampling | https://matplotlib.org/stable/_downloads/b6b8bdee6cb17ac313bed674ef0b372b/image_antialiasing.py | image_antialiasing.py | images_contours_and_fields | ok | 11 | null | |
"""
================
Image resampling
================
Images are represented by discrete pixels assigned color values, either on the
screen or in an image file. When a user calls `~.Axes.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 i... | stable__gallery__images_contours_and_fields__image_antialiasing | 1 | figure_001.png | Image resampling — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/image_antialiasing.html#up-sampling | https://matplotlib.org/stable/_downloads/b6b8bdee6cb17ac313bed674ef0b372b/image_antialiasing.py | image_antialiasing.py | images_contours_and_fields | ok | 11 | null | |
"""
================
Image resampling
================
Images are represented by discrete pixels assigned color values, either on the
screen or in an image file. When a user calls `~.Axes.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 i... | stable__gallery__images_contours_and_fields__image_antialiasing | 2 | figure_002.png | Image resampling — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/image_antialiasing.html#up-sampling | https://matplotlib.org/stable/_downloads/b6b8bdee6cb17ac313bed674ef0b372b/image_antialiasing.py | image_antialiasing.py | images_contours_and_fields | ok | 11 | null | |
"""
================
Image resampling
================
Images are represented by discrete pixels assigned color values, either on the
screen or in an image file. When a user calls `~.Axes.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 i... | stable__gallery__images_contours_and_fields__image_antialiasing | 3 | figure_003.png | Image resampling — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/image_antialiasing.html#up-sampling | https://matplotlib.org/stable/_downloads/b6b8bdee6cb17ac313bed674ef0b372b/image_antialiasing.py | image_antialiasing.py | images_contours_and_fields | ok | 11 | null | |
"""
================
Image resampling
================
Images are represented by discrete pixels assigned color values, either on the
screen or in an image file. When a user calls `~.Axes.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 i... | stable__gallery__images_contours_and_fields__image_antialiasing | 4 | figure_004.png | Image resampling — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/image_antialiasing.html#up-sampling | https://matplotlib.org/stable/_downloads/b6b8bdee6cb17ac313bed674ef0b372b/image_antialiasing.py | image_antialiasing.py | images_contours_and_fields | ok | 11 | null | |
"""
============================
Clipping images with patches
============================
Demo of image that's been clipped by a circular patch.
"""
import matplotlib.pyplot as plt
import matplotlib.cbook as cbook
import matplotlib.patches as patches
with cbook.get_sample_data('grace_hopper.jpg') as image_file:
... | stable__gallery__images_contours_and_fields__image_clip_path | 0 | figure_000.png | Clipping images with patches — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/image_clip_path.html#sphx-glr-download-gallery-images-contours-and-fields-image-clip-path-py | https://matplotlib.org/stable/_downloads/ce934135c1eb77d0aa284a948f1a584e/image_clip_path.py | image_clip_path.py | images_contours_and_fields | ok | 1 | null | |
"""
========================
Many ways to plot images
========================
The most common way to plot images in Matplotlib is with
`~.axes.Axes.imshow`. The following examples demonstrate much of the
functionality of imshow and the many images you can create.
"""
import matplotlib.pyplot as plt
import numpy as n... | stable__gallery__images_contours_and_fields__image_demo | 0 | figure_000.png | Many ways to plot images — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/image_demo.html#sphx-glr-download-gallery-images-contours-and-fields-image-demo-py | https://matplotlib.org/stable/_downloads/b5a350ce8afb3588da1f78a11d15ad0d/image_demo.py | image_demo.py | images_contours_and_fields | ok | 5 | null | |
"""
========================
Image with masked values
========================
imshow with masked array input and out-of-range colors.
The second subplot illustrates the use of BoundaryNorm to
get a filled contour effect.
"""
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.colors as colors
# c... | stable__gallery__images_contours_and_fields__image_masked | 0 | figure_000.png | Image with masked values — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/image_masked.html#sphx-glr-download-gallery-images-contours-and-fields-image-masked-py | https://matplotlib.org/stable/_downloads/455c7369df685db431cee2fd16862fdd/image_masked.py | image_masked.py | images_contours_and_fields | ok | 1 | null | |
"""
================
Image nonuniform
================
`.NonUniformImage` is a generalized image with pixels on a rectilinear grid,
i.e. it allows rows and columns with individual heights / widths.
There is no high-level plotting method on `~.axes.Axes` or `.pyplot` to
create a NonUniformImage. Instead, you have to i... | stable__gallery__images_contours_and_fields__image_nonuniform | 0 | figure_000.png | Image nonuniform — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/image_nonuniform.html#sphx-glr-download-gallery-images-contours-and-fields-image-nonuniform-py | https://matplotlib.org/stable/_downloads/cfc16c13f4a562ee23bf206246c5da51/image_nonuniform.py | image_nonuniform.py | images_contours_and_fields | ok | 1 | null | |
"""
==========================================
Blend transparency with color in 2D images
==========================================
Blend transparency with color to highlight parts of data with imshow.
A common use for `matplotlib.pyplot.imshow` is to plot a 2D statistical
map. The function makes it easy to visualiz... | stable__gallery__images_contours_and_fields__image_transparency_blend | 0 | figure_000.png | Blend transparency with color in 2D images — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/image_transparency_blend.html#using-transparency-to-highlight-values-with-high-amplitude | https://matplotlib.org/stable/_downloads/f916babc2a191fb56bf15aadecb3bae1/image_transparency_blend.py | image_transparency_blend.py | images_contours_and_fields | ok | 3 | null | |
"""
==========================================
Blend transparency with color in 2D images
==========================================
Blend transparency with color to highlight parts of data with imshow.
A common use for `matplotlib.pyplot.imshow` is to plot a 2D statistical
map. The function makes it easy to visualiz... | stable__gallery__images_contours_and_fields__image_transparency_blend | 1 | figure_001.png | Blend transparency with color in 2D images — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/image_transparency_blend.html#using-transparency-to-highlight-values-with-high-amplitude | https://matplotlib.org/stable/_downloads/f916babc2a191fb56bf15aadecb3bae1/image_transparency_blend.py | image_transparency_blend.py | images_contours_and_fields | ok | 3 | null | |
"""
==========================================
Blend transparency with color in 2D images
==========================================
Blend transparency with color to highlight parts of data with imshow.
A common use for `matplotlib.pyplot.imshow` is to plot a 2D statistical
map. The function makes it easy to visualiz... | stable__gallery__images_contours_and_fields__image_transparency_blend | 2 | figure_002.png | Blend transparency with color in 2D images — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/image_transparency_blend.html#using-transparency-to-highlight-values-with-high-amplitude | https://matplotlib.org/stable/_downloads/f916babc2a191fb56bf15aadecb3bae1/image_transparency_blend.py | image_transparency_blend.py | images_contours_and_fields | ok | 3 | null | |
"""
==================================
Modifying the coordinate formatter
==================================
Modify the coordinate formatter to report the image "z" value of the nearest
pixel given x and y. This functionality is built in by default; this example
just showcases how to customize the `~.axes.Axes.format... | stable__gallery__images_contours_and_fields__image_zcoord | 0 | figure_000.png | Modifying the coordinate formatter — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/image_zcoord.html#sphx-glr-download-gallery-images-contours-and-fields-image-zcoord-py | https://matplotlib.org/stable/_downloads/a3c1cad47bdc471a440b69e949e3af19/image_zcoord.py | image_zcoord.py | images_contours_and_fields | ok | 1 | null | |
"""
=========================
Interpolations for imshow
=========================
This example displays the difference between interpolation methods for
`~.axes.Axes.imshow`.
If *interpolation* is None, it defaults to the :rc:`image.interpolation`.
If the interpolation is ``'none'``, then no interpolation is performe... | stable__gallery__images_contours_and_fields__interpolation_methods | 0 | figure_000.png | Interpolations for imshow — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/interpolation_methods.html#sphx-glr-download-gallery-images-contours-and-fields-interpolation-methods-py | https://matplotlib.org/stable/_downloads/1b7a83577fbe998fc2f1a84e50c81939/interpolation_methods.py | interpolation_methods.py | images_contours_and_fields | ok | 1 | null | |
"""
=======================================
Contour plot of irregularly spaced data
=======================================
Comparison of a contour plot of irregularly spaced data interpolated
on a regular grid versus a tricontour plot for an unstructured triangular grid.
Since `~.axes.Axes.contour` and `~.axes.Axes.... | stable__gallery__images_contours_and_fields__irregulardatagrid | 0 | figure_000.png | Contour plot of irregularly spaced data — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/irregulardatagrid.html#sphx-glr-download-gallery-images-contours-and-fields-irregulardatagrid-py | https://matplotlib.org/stable/_downloads/758c39512ff467ae08f5d49cccfb7f30/irregulardatagrid.py | irregulardatagrid.py | images_contours_and_fields | ok | 1 | null | |
"""
================================
Layer images with alpha blending
================================
Layer images above one another using alpha blending
"""
import matplotlib.pyplot as plt
import numpy as np
def func3(x, y):
return (1 - x / 2 + x**5 + y**3) * np.exp(-(x**2 + y**2))
# make these smaller to in... | stable__gallery__images_contours_and_fields__layer_images | 0 | figure_000.png | Layer images with alpha blending — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/layer_images.html#sphx-glr-download-gallery-images-contours-and-fields-layer-images-py | https://matplotlib.org/stable/_downloads/36a5c3960fdb309b098795e7222235d5/layer_images.py | layer_images.py | images_contours_and_fields | ok | 1 | null | |
"""
===============================
Visualize matrices with matshow
===============================
`~.axes.Axes.matshow` visualizes a 2D matrix or array as color-coded image.
"""
import matplotlib.pyplot as plt
import numpy as np
# a 2D array with linearly increasing values on the diagonal
a = np.diag(range(15))
pl... | stable__gallery__images_contours_and_fields__matshow | 0 | figure_000.png | Visualize matrices with matshow — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/matshow.html#visualize-matrices-with-matshow | https://matplotlib.org/stable/_downloads/7769822d44c75e67a774a10e19660713/matshow.py | matshow.py | images_contours_and_fields | ok | 1 | null | |
"""
=================================
Multiple images with one colorbar
=================================
Use a single colorbar for multiple images.
Currently, a colorbar can only be connected to one image. The connection
guarantees that the data coloring is consistent with the colormap scale
(i.e. the color of value... | stable__gallery__images_contours_and_fields__multi_image | 0 | figure_000.png | Multiple images with one colorbar — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/multi_image.html#sphx-glr-download-gallery-images-contours-and-fields-multi-image-py | https://matplotlib.org/stable/_downloads/3d9ed4bd74fec2fd15978e0cd1497919/multi_image.py | multi_image.py | images_contours_and_fields | ok | 1 | null | |
"""
=============
pcolor images
=============
`~.Axes.pcolor` generates 2D image-style plots, as illustrated below.
"""
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.colors import LogNorm
# Fixing random state for reproducibility
np.random.seed(19680801)
# %%
# A simple pcolor demo
# ---------... | stable__gallery__images_contours_and_fields__pcolor_demo | 0 | figure_000.png | pcolor images — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/pcolor_demo.html#sphx-glr-download-gallery-images-contours-and-fields-pcolor-demo-py | https://matplotlib.org/stable/_downloads/edc9e862d9e0d115b20877b32f705afc/pcolor_demo.py | pcolor_demo.py | images_contours_and_fields | ok | 3 | null | |
"""
============================
pcolormesh grids and shading
============================
`.axes.Axes.pcolormesh` and `~.axes.Axes.pcolor` have a few options for
how grids are laid out and the shading between the grid points.
Generally, if *Z* has shape *(M, N)* then the grid *X* and *Y* can be
specified with either... | stable__gallery__images_contours_and_fields__pcolormesh_grids | 0 | figure_000.png | pcolormesh grids and shading — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/pcolormesh_grids.html#sphx-glr-download-gallery-images-contours-and-fields-pcolormesh-grids-py | https://matplotlib.org/stable/_downloads/51ce5d45a9f81f08536085d417152499/pcolormesh_grids.py | pcolormesh_grids.py | images_contours_and_fields | ok | 5 | null | |
"""
============================
pcolormesh grids and shading
============================
`.axes.Axes.pcolormesh` and `~.axes.Axes.pcolor` have a few options for
how grids are laid out and the shading between the grid points.
Generally, if *Z* has shape *(M, N)* then the grid *X* and *Y* can be
specified with either... | stable__gallery__images_contours_and_fields__pcolormesh_grids | 1 | figure_001.png | pcolormesh grids and shading — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/pcolormesh_grids.html#sphx-glr-download-gallery-images-contours-and-fields-pcolormesh-grids-py | https://matplotlib.org/stable/_downloads/51ce5d45a9f81f08536085d417152499/pcolormesh_grids.py | pcolormesh_grids.py | images_contours_and_fields | ok | 5 | null | |
"""
============================
pcolormesh grids and shading
============================
`.axes.Axes.pcolormesh` and `~.axes.Axes.pcolor` have a few options for
how grids are laid out and the shading between the grid points.
Generally, if *Z* has shape *(M, N)* then the grid *X* and *Y* can be
specified with either... | stable__gallery__images_contours_and_fields__pcolormesh_grids | 2 | figure_002.png | pcolormesh grids and shading — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/pcolormesh_grids.html#sphx-glr-download-gallery-images-contours-and-fields-pcolormesh-grids-py | https://matplotlib.org/stable/_downloads/51ce5d45a9f81f08536085d417152499/pcolormesh_grids.py | pcolormesh_grids.py | images_contours_and_fields | ok | 5 | null | |
"""
============================
pcolormesh grids and shading
============================
`.axes.Axes.pcolormesh` and `~.axes.Axes.pcolor` have a few options for
how grids are laid out and the shading between the grid points.
Generally, if *Z* has shape *(M, N)* then the grid *X* and *Y* can be
specified with either... | stable__gallery__images_contours_and_fields__pcolormesh_grids | 3 | figure_003.png | pcolormesh grids and shading — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/pcolormesh_grids.html#sphx-glr-download-gallery-images-contours-and-fields-pcolormesh-grids-py | https://matplotlib.org/stable/_downloads/51ce5d45a9f81f08536085d417152499/pcolormesh_grids.py | pcolormesh_grids.py | images_contours_and_fields | ok | 5 | null | |
"""
============================
pcolormesh grids and shading
============================
`.axes.Axes.pcolormesh` and `~.axes.Axes.pcolor` have a few options for
how grids are laid out and the shading between the grid points.
Generally, if *Z* has shape *(M, N)* then the grid *X* and *Y* can be
specified with either... | stable__gallery__images_contours_and_fields__pcolormesh_grids | 4 | figure_004.png | pcolormesh grids and shading — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/pcolormesh_grids.html#sphx-glr-download-gallery-images-contours-and-fields-pcolormesh-grids-py | https://matplotlib.org/stable/_downloads/51ce5d45a9f81f08536085d417152499/pcolormesh_grids.py | pcolormesh_grids.py | images_contours_and_fields | ok | 5 | null | |
"""
==========
pcolormesh
==========
`.axes.Axes.pcolormesh` allows you to generate 2D image-style plots.
Note that it is faster than the similar `~.axes.Axes.pcolor`.
"""
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.colors import BoundaryNorm
from matplotlib.ticker import MaxNLocator
# %%
# ... | stable__gallery__images_contours_and_fields__pcolormesh_levels | 0 | figure_000.png | pcolormesh — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/pcolormesh_levels.html#sphx-glr-download-gallery-images-contours-and-fields-pcolormesh-levels-py | https://matplotlib.org/stable/_downloads/03781bf1f3fd18cae78c6b58d0385d23/pcolormesh_levels.py | pcolormesh_levels.py | images_contours_and_fields | ok | 4 | null | |
"""
==========
pcolormesh
==========
`.axes.Axes.pcolormesh` allows you to generate 2D image-style plots.
Note that it is faster than the similar `~.axes.Axes.pcolor`.
"""
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.colors import BoundaryNorm
from matplotlib.ticker import MaxNLocator
# %%
# ... | stable__gallery__images_contours_and_fields__pcolormesh_levels | 1 | figure_001.png | pcolormesh — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/pcolormesh_levels.html#sphx-glr-download-gallery-images-contours-and-fields-pcolormesh-levels-py | https://matplotlib.org/stable/_downloads/03781bf1f3fd18cae78c6b58d0385d23/pcolormesh_levels.py | pcolormesh_levels.py | images_contours_and_fields | ok | 4 | null | |
"""
==========
pcolormesh
==========
`.axes.Axes.pcolormesh` allows you to generate 2D image-style plots.
Note that it is faster than the similar `~.axes.Axes.pcolor`.
"""
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.colors import BoundaryNorm
from matplotlib.ticker import MaxNLocator
# %%
# ... | stable__gallery__images_contours_and_fields__pcolormesh_levels | 2 | figure_002.png | pcolormesh — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/pcolormesh_levels.html#sphx-glr-download-gallery-images-contours-and-fields-pcolormesh-levels-py | https://matplotlib.org/stable/_downloads/03781bf1f3fd18cae78c6b58d0385d23/pcolormesh_levels.py | pcolormesh_levels.py | images_contours_and_fields | ok | 4 | null | |
"""
==========
pcolormesh
==========
`.axes.Axes.pcolormesh` allows you to generate 2D image-style plots.
Note that it is faster than the similar `~.axes.Axes.pcolor`.
"""
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.colors import BoundaryNorm
from matplotlib.ticker import MaxNLocator
# %%
# ... | stable__gallery__images_contours_and_fields__pcolormesh_levels | 3 | figure_003.png | pcolormesh — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/pcolormesh_levels.html#sphx-glr-download-gallery-images-contours-and-fields-pcolormesh-levels-py | https://matplotlib.org/stable/_downloads/03781bf1f3fd18cae78c6b58d0385d23/pcolormesh_levels.py | pcolormesh_levels.py | images_contours_and_fields | ok | 4 | null | |
"""
==========
Streamplot
==========
A stream plot, or streamline plot, is used to display 2D vector fields. This
example shows a few features of the `~.axes.Axes.streamplot` function:
* Varying the color along a streamline.
* Varying the density of streamlines.
* Varying the line width along a streamline.
* Controll... | stable__gallery__images_contours_and_fields__plot_streamplot | 0 | figure_000.png | Streamplot — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/plot_streamplot.html#streamplot | https://matplotlib.org/stable/_downloads/ccb41fb8b32e1fa15ca039a7877b3f49/plot_streamplot.py | plot_streamplot.py | images_contours_and_fields | ok | 1 | null | |
"""
=============
QuadMesh Demo
=============
`~.axes.Axes.pcolormesh` uses a `~matplotlib.collections.QuadMesh`,
a faster generalization of `~.axes.Axes.pcolor`, but with some restrictions.
This demo illustrates a bug in quadmesh with masked data.
"""
import numpy as np
from matplotlib import pyplot as plt
n = 12... | stable__gallery__images_contours_and_fields__quadmesh_demo | 0 | figure_000.png | QuadMesh Demo — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/quadmesh_demo.html#sphx-glr-download-gallery-images-contours-and-fields-quadmesh-demo-py | https://matplotlib.org/stable/_downloads/30e49bc716f8977e6fcbadd395b6240f/quadmesh_demo.py | quadmesh_demo.py | images_contours_and_fields | ok | 1 | null | |
"""
=======================================
Advanced quiver and quiverkey functions
=======================================
Demonstrates some more advanced options for `~.axes.Axes.quiver`. For a simple
example refer to :doc:`/gallery/images_contours_and_fields/quiver_simple_demo`.
Note: The plot autoscaling does no... | stable__gallery__images_contours_and_fields__quiver_demo | 0 | figure_000.png | Advanced quiver and quiverkey functions — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/quiver_demo.html#sphx-glr-download-gallery-images-contours-and-fields-quiver-demo-py | https://matplotlib.org/stable/_downloads/f0464b60f3d0eca1718a7ab6747faa06/quiver_demo.py | quiver_demo.py | images_contours_and_fields | ok | 3 | null | |
"""
=======================================
Advanced quiver and quiverkey functions
=======================================
Demonstrates some more advanced options for `~.axes.Axes.quiver`. For a simple
example refer to :doc:`/gallery/images_contours_and_fields/quiver_simple_demo`.
Note: The plot autoscaling does no... | stable__gallery__images_contours_and_fields__quiver_demo | 1 | figure_001.png | Advanced quiver and quiverkey functions — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/quiver_demo.html#sphx-glr-download-gallery-images-contours-and-fields-quiver-demo-py | https://matplotlib.org/stable/_downloads/f0464b60f3d0eca1718a7ab6747faa06/quiver_demo.py | quiver_demo.py | images_contours_and_fields | ok | 3 | null | |
"""
=======================================
Advanced quiver and quiverkey functions
=======================================
Demonstrates some more advanced options for `~.axes.Axes.quiver`. For a simple
example refer to :doc:`/gallery/images_contours_and_fields/quiver_simple_demo`.
Note: The plot autoscaling does no... | stable__gallery__images_contours_and_fields__quiver_demo | 2 | figure_002.png | Advanced quiver and quiverkey functions — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/quiver_demo.html#sphx-glr-download-gallery-images-contours-and-fields-quiver-demo-py | https://matplotlib.org/stable/_downloads/f0464b60f3d0eca1718a7ab6747faa06/quiver_demo.py | quiver_demo.py | images_contours_and_fields | ok | 3 | null | |
"""
==================
Quiver Simple Demo
==================
A simple example of a `~.axes.Axes.quiver` plot with a `~.axes.Axes.quiverkey`.
For more advanced options refer to
:doc:`/gallery/images_contours_and_fields/quiver_demo`.
"""
import matplotlib.pyplot as plt
import numpy as np
X = np.arange(-10, 10, 1)
Y = ... | stable__gallery__images_contours_and_fields__quiver_simple_demo | 0 | figure_000.png | Quiver Simple Demo — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/quiver_simple_demo.html#sphx-glr-download-gallery-images-contours-and-fields-quiver-simple-demo-py | https://matplotlib.org/stable/_downloads/5a48ca1008ec889cb849275558b036a9/quiver_simple_demo.py | quiver_simple_demo.py | images_contours_and_fields | ok | 1 | null | |
"""
===============
Shading example
===============
Example showing how to make shaded relief plots like Mathematica_ or
`Generic Mapping Tools`_.
.. _Mathematica: http://reference.wolfram.com/mathematica/ref/ReliefPlot.html
.. _Generic Mapping Tools: https://www.generic-mapping-tools.org/
"""
import matplotlib.pypl... | stable__gallery__images_contours_and_fields__shading_example | 0 | figure_000.png | Shading example — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/shading_example.html#sphx-glr-download-gallery-images-contours-and-fields-shading-example-py | https://matplotlib.org/stable/_downloads/51f72ac52a09ab1afd7282dc56b96fb3/shading_example.py | shading_example.py | images_contours_and_fields | ok | 2 | null | |
"""
===============
Shading example
===============
Example showing how to make shaded relief plots like Mathematica_ or
`Generic Mapping Tools`_.
.. _Mathematica: http://reference.wolfram.com/mathematica/ref/ReliefPlot.html
.. _Generic Mapping Tools: https://www.generic-mapping-tools.org/
"""
import matplotlib.pypl... | stable__gallery__images_contours_and_fields__shading_example | 1 | figure_001.png | Shading example — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/shading_example.html#sphx-glr-download-gallery-images-contours-and-fields-shading-example-py | https://matplotlib.org/stable/_downloads/51f72ac52a09ab1afd7282dc56b96fb3/shading_example.py | shading_example.py | images_contours_and_fields | ok | 2 | null | |
"""
===========
Spectrogram
===========
Plotting a spectrogram using `~.Axes.specgram`.
"""
import matplotlib.pyplot as plt
import numpy as np
# Fixing random state for reproducibility
np.random.seed(19680801)
dt = 0.0005
t = np.arange(0.0, 20.5, dt)
s1 = np.sin(2 * np.pi * 100 * t)
s2 = 2 * np.sin(2 * np.pi * 400 *... | stable__gallery__images_contours_and_fields__specgram_demo | 0 | figure_000.png | Spectrogram — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/specgram_demo.html#sphx-glr-download-gallery-images-contours-and-fields-specgram-demo-py | https://matplotlib.org/stable/_downloads/e46a8d77906904db48e0e64959be9b24/specgram_demo.py | specgram_demo.py | images_contours_and_fields | ok | 1 | null | |
"""
=========
Spy Demos
=========
Plot the sparsity pattern of arrays.
"""
import matplotlib.pyplot as plt
import numpy as np
# Fixing random state for reproducibility
np.random.seed(19680801)
fig, axs = plt.subplots(2, 2)
ax1 = axs[0, 0]
ax2 = axs[0, 1]
ax3 = axs[1, 0]
ax4 = axs[1, 1]
x = np.random.randn(20, 20)
... | stable__gallery__images_contours_and_fields__spy_demos | 0 | figure_000.png | Spy Demos — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/spy_demos.html#spy-demos | https://matplotlib.org/stable/_downloads/4fe4be973e85752a53c9544548ec4f8b/spy_demos.py | spy_demos.py | images_contours_and_fields | ok | 1 | null | |
"""
===============
Tricontour Demo
===============
Contour plots of unstructured triangular grids.
"""
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.tri as tri
# %%
# Creating a Triangulation without specifying the triangles results in the
# Delaunay triangulation of the points.
# First crea... | stable__gallery__images_contours_and_fields__tricontour_demo | 0 | figure_000.png | Tricontour Demo — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/tricontour_demo.html#tricontour-demo | https://matplotlib.org/stable/_downloads/01526d1bc6f0260beff6382b79ae89ea/tricontour_demo.py | tricontour_demo.py | images_contours_and_fields | ok | 4 | null | |
"""
===============
Tricontour Demo
===============
Contour plots of unstructured triangular grids.
"""
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.tri as tri
# %%
# Creating a Triangulation without specifying the triangles results in the
# Delaunay triangulation of the points.
# First crea... | stable__gallery__images_contours_and_fields__tricontour_demo | 1 | figure_001.png | Tricontour Demo — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/tricontour_demo.html#tricontour-demo | https://matplotlib.org/stable/_downloads/01526d1bc6f0260beff6382b79ae89ea/tricontour_demo.py | tricontour_demo.py | images_contours_and_fields | ok | 4 | null | |
"""
===============
Tricontour Demo
===============
Contour plots of unstructured triangular grids.
"""
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.tri as tri
# %%
# Creating a Triangulation without specifying the triangles results in the
# Delaunay triangulation of the points.
# First crea... | stable__gallery__images_contours_and_fields__tricontour_demo | 2 | figure_002.png | Tricontour Demo — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/tricontour_demo.html#tricontour-demo | https://matplotlib.org/stable/_downloads/01526d1bc6f0260beff6382b79ae89ea/tricontour_demo.py | tricontour_demo.py | images_contours_and_fields | ok | 4 | null | |
"""
===============
Tricontour Demo
===============
Contour plots of unstructured triangular grids.
"""
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.tri as tri
# %%
# Creating a Triangulation without specifying the triangles results in the
# Delaunay triangulation of the points.
# First crea... | stable__gallery__images_contours_and_fields__tricontour_demo | 3 | figure_003.png | Tricontour Demo — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/tricontour_demo.html#tricontour-demo | https://matplotlib.org/stable/_downloads/01526d1bc6f0260beff6382b79ae89ea/tricontour_demo.py | tricontour_demo.py | images_contours_and_fields | ok | 4 | null | |
"""
==========================
Tricontour Smooth Delaunay
==========================
Demonstrates high-resolution tricontouring of a random set of points;
a `matplotlib.tri.TriAnalyzer` is used to improve the plot quality.
The initial data points and triangular grid for this demo are:
- a set of random points is ins... | stable__gallery__images_contours_and_fields__tricontour_smooth_delaunay | 0 | figure_000.png | Tricontour Smooth Delaunay — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/tricontour_smooth_delaunay.html#tricontour-smooth-delaunay | https://matplotlib.org/stable/_downloads/0e6c09e389820026dfb75063860b5045/tricontour_smooth_delaunay.py | tricontour_smooth_delaunay.py | images_contours_and_fields | ok | 1 | null | |
"""
======================
Tricontour Smooth User
======================
Demonstrates high-resolution tricontouring on user-defined triangular grids
with `matplotlib.tri.UniformTriRefiner`.
"""
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.tri as tri
# ----------------------------------------... | stable__gallery__images_contours_and_fields__tricontour_smooth_user | 0 | figure_000.png | Tricontour Smooth User — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/tricontour_smooth_user.html#tricontour-smooth-user | https://matplotlib.org/stable/_downloads/de185df8069c302ac85adb149de3a67d/tricontour_smooth_user.py | tricontour_smooth_user.py | images_contours_and_fields | ok | 1 | null | |
"""
================
Trigradient Demo
================
Demonstrates computation of gradient with
`matplotlib.tri.CubicTriInterpolator`.
"""
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.tri import (CubicTriInterpolator, Triangulation,
UniformTriRefiner)
# -----------... | stable__gallery__images_contours_and_fields__trigradient_demo | 0 | figure_000.png | Trigradient Demo — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/trigradient_demo.html#trigradient-demo | https://matplotlib.org/stable/_downloads/49c0b2ce987e181c996206b69c9ac9d9/trigradient_demo.py | trigradient_demo.py | images_contours_and_fields | ok | 1 | null | |
"""
==============
Triinterp Demo
==============
Interpolation from triangular grid to quad grid.
"""
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.tri as mtri
# Create triangulation.
x = np.asarray([0, 1, 2, 3, 0.5, 1.5, 2.5, 1, 2, 1.5])
y = np.asarray([0, 0, 0, 0, 1.0, 1.0, 1.0, 2, 2, 3.0])
... | stable__gallery__images_contours_and_fields__triinterp_demo | 0 | figure_000.png | Triinterp Demo — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/triinterp_demo.html#triinterp-demo | https://matplotlib.org/stable/_downloads/361aba6dfcdc72919013a5c7520af2e2/triinterp_demo.py | triinterp_demo.py | images_contours_and_fields | ok | 1 | null | |
"""
==============
Tripcolor Demo
==============
Pseudocolor plots of unstructured triangular grids.
"""
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.tri as tri
# %%
# Creating a Triangulation without specifying the triangles results in the
# Delaunay triangulation of the points.
# First cre... | stable__gallery__images_contours_and_fields__tripcolor_demo | 0 | figure_000.png | Tripcolor Demo — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/tripcolor_demo.html#tripcolor-demo | https://matplotlib.org/stable/_downloads/46ef0c6a91a50cf87f407e9ba1c5d746/tripcolor_demo.py | tripcolor_demo.py | images_contours_and_fields | ok | 3 | null | |
"""
==============
Tripcolor Demo
==============
Pseudocolor plots of unstructured triangular grids.
"""
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.tri as tri
# %%
# Creating a Triangulation without specifying the triangles results in the
# Delaunay triangulation of the points.
# First cre... | stable__gallery__images_contours_and_fields__tripcolor_demo | 1 | figure_001.png | Tripcolor Demo — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/tripcolor_demo.html#tripcolor-demo | https://matplotlib.org/stable/_downloads/46ef0c6a91a50cf87f407e9ba1c5d746/tripcolor_demo.py | tripcolor_demo.py | images_contours_and_fields | ok | 3 | null | |
"""
==============
Tripcolor Demo
==============
Pseudocolor plots of unstructured triangular grids.
"""
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.tri as tri
# %%
# Creating a Triangulation without specifying the triangles results in the
# Delaunay triangulation of the points.
# First cre... | stable__gallery__images_contours_and_fields__tripcolor_demo | 2 | figure_002.png | Tripcolor Demo — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/tripcolor_demo.html#tripcolor-demo | https://matplotlib.org/stable/_downloads/46ef0c6a91a50cf87f407e9ba1c5d746/tripcolor_demo.py | tripcolor_demo.py | images_contours_and_fields | ok | 3 | null | |
"""
============
Triplot Demo
============
Creating and plotting unstructured triangular grids.
"""
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.tri as tri
# %%
# Creating a Triangulation without specifying the triangles results in the
# Delaunay triangulation of the points.
# First create t... | stable__gallery__images_contours_and_fields__triplot_demo | 0 | figure_000.png | Triplot Demo — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/triplot_demo.html#triplot-demo | https://matplotlib.org/stable/_downloads/3df28a3c8ff5be58c4e114559ebb6ac7/triplot_demo.py | triplot_demo.py | images_contours_and_fields | ok | 2 | null | |
"""
============
Triplot Demo
============
Creating and plotting unstructured triangular grids.
"""
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.tri as tri
# %%
# Creating a Triangulation without specifying the triangles results in the
# Delaunay triangulation of the points.
# First create t... | stable__gallery__images_contours_and_fields__triplot_demo | 1 | figure_001.png | Triplot Demo — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/triplot_demo.html#triplot-demo | https://matplotlib.org/stable/_downloads/3df28a3c8ff5be58c4e114559ebb6ac7/triplot_demo.py | triplot_demo.py | images_contours_and_fields | ok | 2 | null | |
"""
===============
Watermark image
===============
Overlay an image on a plot by moving it to the front (``zorder=3``) and making it
semi-transparent (``alpha=0.7``).
"""
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.cbook as cbook
import matplotlib.image as image
with cbook.get_sample_data(... | stable__gallery__images_contours_and_fields__watermark_image | 0 | figure_000.png | Watermark image — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/images_contours_and_fields/watermark_image.html#watermark-image | https://matplotlib.org/stable/_downloads/5f96e9c3090dbe1028725071e100d1bc/watermark_image.py | watermark_image.py | images_contours_and_fields | ok | 1 | null | |
"""
==============
Infinite lines
==============
`~.axes.Axes.axvline` and `~.axes.Axes.axhline` draw infinite vertical /
horizontal lines, at given *x* / *y* positions. They are usually used to mark
special data values, e.g. in this example the center and limit values of the
sigmoid function.
`~.axes.Axes.axline` dr... | stable__gallery__lines_bars_and_markers__axline | 0 | figure_000.png | Infinite lines — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/lines_bars_and_markers/axline.html#sphx-glr-download-gallery-lines-bars-and-markers-axline-py | https://matplotlib.org/stable/_downloads/1dacc0af8687a303f762959dc90a3690/axline.py | axline.py | lines_bars_and_markers | ok | 2 | null | |
"""
====================================
Bar chart with individual bar colors
====================================
This is an example showing how to control bar color and legend entries
using the *color* and *label* parameters of `~matplotlib.pyplot.bar`.
Note that labels with a preceding underscore won't show up in t... | stable__gallery__lines_bars_and_markers__bar_colors | 0 | figure_000.png | Bar chart with individual bar colors — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/lines_bars_and_markers/bar_colors.html#sphx-glr-download-gallery-lines-bars-and-markers-bar-colors-py | https://matplotlib.org/stable/_downloads/1a19c468ce7a45f5806f970dd857af7b/bar_colors.py | bar_colors.py | lines_bars_and_markers | ok | 1 | null | |
"""
=====================
Bar chart with labels
=====================
This example shows how to use the `~.Axes.bar_label` helper function
to create bar chart labels.
See also the :doc:`grouped bar
</gallery/lines_bars_and_markers/barchart>`,
:doc:`stacked bar
</gallery/lines_bars_and_markers/bar_stacked>` and
:doc:`... | stable__gallery__lines_bars_and_markers__bar_label_demo | 0 | figure_000.png | Bar chart with labels — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/lines_bars_and_markers/bar_label_demo.html#sphx-glr-download-gallery-lines-bars-and-markers-bar-label-demo-py | https://matplotlib.org/stable/_downloads/a2b801f410afc3c47aa5b22d4e188707/bar_label_demo.py | bar_label_demo.py | lines_bars_and_markers | ok | 5 | null | |
"""
=====================
Bar chart with labels
=====================
This example shows how to use the `~.Axes.bar_label` helper function
to create bar chart labels.
See also the :doc:`grouped bar
</gallery/lines_bars_and_markers/barchart>`,
:doc:`stacked bar
</gallery/lines_bars_and_markers/bar_stacked>` and
:doc:`... | stable__gallery__lines_bars_and_markers__bar_label_demo | 1 | figure_001.png | Bar chart with labels — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/lines_bars_and_markers/bar_label_demo.html#sphx-glr-download-gallery-lines-bars-and-markers-bar-label-demo-py | https://matplotlib.org/stable/_downloads/a2b801f410afc3c47aa5b22d4e188707/bar_label_demo.py | bar_label_demo.py | lines_bars_and_markers | ok | 5 | null | |
"""
=================
Stacked bar chart
=================
This is an example of creating a stacked bar plot
using `~matplotlib.pyplot.bar`.
"""
import matplotlib.pyplot as plt
import numpy as np
# data from https://allisonhorst.github.io/palmerpenguins/
species = (
"Adelie\n $\\mu=$3700.66g",
"Chinstrap\n $... | stable__gallery__lines_bars_and_markers__bar_stacked | 0 | figure_000.png | Stacked bar chart — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/lines_bars_and_markers/bar_stacked.html#stacked-bar-chart | https://matplotlib.org/stable/_downloads/2ac62a2edbb00a99e8a853b17387ef14/bar_stacked.py | bar_stacked.py | lines_bars_and_markers | ok | 1 | null | |
"""
=============================
Grouped bar chart with labels
=============================
This example shows a how to create a grouped bar chart and how to annotate
bars with labels.
"""
# data from https://allisonhorst.github.io/palmerpenguins/
import matplotlib.pyplot as plt
import numpy as np
species = ("Ade... | stable__gallery__lines_bars_and_markers__barchart | 0 | figure_000.png | Grouped bar chart with labels — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/lines_bars_and_markers/barchart.html#sphx-glr-download-gallery-lines-bars-and-markers-barchart-py | https://matplotlib.org/stable/_downloads/9079c7956239a0c7507bbae7d553ce77/barchart.py | barchart.py | lines_bars_and_markers | ok | 1 | null | |
"""
====================
Horizontal bar chart
====================
This example showcases a simple horizontal bar chart.
"""
import matplotlib.pyplot as plt
import numpy as np
# Fixing random state for reproducibility
np.random.seed(19680801)
fig, ax = plt.subplots()
# Example data
people = ('Tom', 'Dick', 'Harry',... | stable__gallery__lines_bars_and_markers__barh | 0 | figure_000.png | Horizontal bar chart — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/lines_bars_and_markers/barh.html#sphx-glr-download-gallery-lines-bars-and-markers-barh-py | https://matplotlib.org/stable/_downloads/08f572befa64d1bf3877e30ed4ff919b/barh.py | barh.py | lines_bars_and_markers | ok | 1 | null | |
"""
======================
Broken horizontal bars
======================
`~.Axes.broken_barh` creates sequences of horizontal bars. This example shows
a timing diagram.
"""
import matplotlib.pyplot as plt
import numpy as np
# data is a sequence of (start, duration) tuples
cpu_1 = [(0, 3), (3.5, 1), (5, 5)]
cpu_2 = np... | stable__gallery__lines_bars_and_markers__broken_barh | 0 | figure_000.png | Broken horizontal bars — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/lines_bars_and_markers/broken_barh.html#sphx-glr-download-gallery-lines-bars-and-markers-broken-barh-py | https://matplotlib.org/stable/_downloads/2f350cc3d27096728668e15f21c44289/broken_barh.py | broken_barh.py | lines_bars_and_markers | ok | 1 | null | |
"""
=========
CapStyle
=========
The `matplotlib._enums.CapStyle` controls how Matplotlib draws the two
endpoints (caps) of an unclosed line. For more details, see the
`~matplotlib._enums.CapStyle` docs.
"""
import matplotlib.pyplot as plt
from matplotlib._enums import CapStyle
CapStyle.demo()
plt.show()
# %%
# ..... | stable__gallery__lines_bars_and_markers__capstyle | 0 | figure_000.png | CapStyle — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/lines_bars_and_markers/capstyle.html#sphx-glr-download-gallery-lines-bars-and-markers-capstyle-py | https://matplotlib.org/stable/_downloads/ed352c10634e2cd8a7c1153d7d1d90dc/capstyle.py | capstyle.py | lines_bars_and_markers | ok | 1 | null | |
"""
==============================
Plotting categorical variables
==============================
You can pass categorical values (i.e. strings) directly as x- or y-values to
many plotting functions:
"""
import matplotlib.pyplot as plt
data = {'apple': 10, 'orange': 15, 'lemon': 5, 'lime': 20}
names = list(data.keys()... | stable__gallery__lines_bars_and_markers__categorical_variables | 0 | figure_000.png | Plotting categorical variables — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/lines_bars_and_markers/categorical_variables.html#sphx-glr-download-gallery-lines-bars-and-markers-categorical-variables-py | https://matplotlib.org/stable/_downloads/1cca3eedfb7940413267d0c7ae15d169/categorical_variables.py | categorical_variables.py | lines_bars_and_markers | ok | 2 | null | |
"""
==============================
Plotting categorical variables
==============================
You can pass categorical values (i.e. strings) directly as x- or y-values to
many plotting functions:
"""
import matplotlib.pyplot as plt
data = {'apple': 10, 'orange': 15, 'lemon': 5, 'lime': 20}
names = list(data.keys()... | stable__gallery__lines_bars_and_markers__categorical_variables | 1 | figure_001.png | Plotting categorical variables — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/lines_bars_and_markers/categorical_variables.html#sphx-glr-download-gallery-lines-bars-and-markers-categorical-variables-py | https://matplotlib.org/stable/_downloads/1cca3eedfb7940413267d0c7ae15d169/categorical_variables.py | categorical_variables.py | lines_bars_and_markers | ok | 2 | null | |
"""
=====================================
Plotting the coherence of two signals
=====================================
An example showing how to plot the coherence of two signals using `~.Axes.cohere`.
"""
import matplotlib.pyplot as plt
import numpy as np
# Fixing random state for reproducibility
np.random.seed(19680... | stable__gallery__lines_bars_and_markers__cohere | 0 | figure_000.png | Plotting the coherence of two signals — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/lines_bars_and_markers/cohere.html#sphx-glr-download-gallery-lines-bars-and-markers-cohere-py | https://matplotlib.org/stable/_downloads/d9a49a8d4c331ce1df9ea376ce24554a/cohere.py | cohere.py | lines_bars_and_markers | ok | 1 | null | |
"""
============================
Cross spectral density (CSD)
============================
Plot the cross spectral density (CSD) of two signals using `~.Axes.csd`.
"""
import matplotlib.pyplot as plt
import numpy as np
fig, (ax1, ax2) = plt.subplots(2, 1, layout='constrained')
dt = 0.01
t = np.arange(0, 30, dt)
# F... | stable__gallery__lines_bars_and_markers__csd_demo | 0 | figure_000.png | Cross spectral density (CSD) — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/lines_bars_and_markers/csd_demo.html#sphx-glr-download-gallery-lines-bars-and-markers-csd-demo-py | https://matplotlib.org/stable/_downloads/84f6fe1dbfd66ce3495ed3a25b245d12/csd_demo.py | csd_demo.py | lines_bars_and_markers | ok | 1 | null | |
"""
=====================
Curve with error band
=====================
This example illustrates how to draw an error band around a parametrized curve.
A parametrized curve x(t), y(t) can directly be drawn using `~.Axes.plot`.
"""
# sphinx_gallery_thumbnail_number = 2
import matplotlib.pyplot as plt
import numpy as np... | stable__gallery__lines_bars_and_markers__curve_error_band | 0 | figure_000.png | Curve with error band — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/lines_bars_and_markers/curve_error_band.html#sphx-glr-download-gallery-lines-bars-and-markers-curve-error-band-py | https://matplotlib.org/stable/_downloads/8f72383ba26aaafc43e68b69bdd4fffc/curve_error_band.py | curve_error_band.py | lines_bars_and_markers | ok | 2 | null | |
"""
=====================
Curve with error band
=====================
This example illustrates how to draw an error band around a parametrized curve.
A parametrized curve x(t), y(t) can directly be drawn using `~.Axes.plot`.
"""
# sphinx_gallery_thumbnail_number = 2
import matplotlib.pyplot as plt
import numpy as np... | stable__gallery__lines_bars_and_markers__curve_error_band | 1 | figure_001.png | Curve with error band — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/lines_bars_and_markers/curve_error_band.html#sphx-glr-download-gallery-lines-bars-and-markers-curve-error-band-py | https://matplotlib.org/stable/_downloads/8f72383ba26aaafc43e68b69bdd4fffc/curve_error_band.py | curve_error_band.py | lines_bars_and_markers | ok | 2 | null | |
"""
========================
Errorbar limit selection
========================
Illustration of selectively drawing lower and/or upper limit symbols on
errorbars using the parameters ``uplims``, ``lolims`` of `~.pyplot.errorbar`.
Alternatively, you can use 2xN values to draw errorbars in only one direction.
"""
impor... | stable__gallery__lines_bars_and_markers__errorbar_limits_simple | 0 | figure_000.png | Errorbar limit selection — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/lines_bars_and_markers/errorbar_limits_simple.html#sphx-glr-download-gallery-lines-bars-and-markers-errorbar-limits-simple-py | https://matplotlib.org/stable/_downloads/abacb9c9e7bf9a53e260eda5861b5829/errorbar_limits_simple.py | errorbar_limits_simple.py | lines_bars_and_markers | ok | 2 | null | |
"""
========================
Errorbar limit selection
========================
Illustration of selectively drawing lower and/or upper limit symbols on
errorbars using the parameters ``uplims``, ``lolims`` of `~.pyplot.errorbar`.
Alternatively, you can use 2xN values to draw errorbars in only one direction.
"""
impor... | stable__gallery__lines_bars_and_markers__errorbar_limits_simple | 1 | figure_001.png | Errorbar limit selection — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/lines_bars_and_markers/errorbar_limits_simple.html#sphx-glr-download-gallery-lines-bars-and-markers-errorbar-limits-simple-py | https://matplotlib.org/stable/_downloads/abacb9c9e7bf9a53e260eda5861b5829/errorbar_limits_simple.py | errorbar_limits_simple.py | lines_bars_and_markers | ok | 2 | null | |
"""
====================
Errorbar subsampling
====================
The parameter *errorevery* of `.Axes.errorbar` can be used to draw error bars
only on a subset of data points. This is particularly useful if there are many
data points with similar errors.
"""
import matplotlib.pyplot as plt
import numpy as np
# exa... | stable__gallery__lines_bars_and_markers__errorbar_subsample | 0 | figure_000.png | Errorbar subsampling — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/lines_bars_and_markers/errorbar_subsample.html#sphx-glr-download-gallery-lines-bars-and-markers-errorbar-subsample-py | https://matplotlib.org/stable/_downloads/d9092da607320ca28dcf66bcc9201b10/errorbar_subsample.py | errorbar_subsample.py | lines_bars_and_markers | ok | 1 | null | |
r"""
====================
EventCollection Demo
====================
Plot two curves, then use `.EventCollection`\s to mark the locations of the x
and y data points on the respective Axes for each curve.
"""
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.collections import EventCollection
# Fixin... | stable__gallery__lines_bars_and_markers__eventcollection_demo | 0 | figure_000.png | EventCollection Demo — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/lines_bars_and_markers/eventcollection_demo.html#sphx-glr-download-gallery-lines-bars-and-markers-eventcollection-demo-py | https://matplotlib.org/stable/_downloads/3dc88c562de73f85d87e1851e2afa1db/eventcollection_demo.py | eventcollection_demo.py | lines_bars_and_markers | ok | 1 | null | |
"""
==============
Eventplot demo
==============
An `~.axes.Axes.eventplot` showing sequences of events with various line
properties. The plot is shown in both horizontal and vertical orientations.
"""
import matplotlib.pyplot as plt
import numpy as np
import matplotlib
matplotlib.rcParams['font.size'] = 8.0
# Fix... | stable__gallery__lines_bars_and_markers__eventplot_demo | 0 | figure_000.png | Eventplot demo — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/lines_bars_and_markers/eventplot_demo.html#sphx-glr-download-gallery-lines-bars-and-markers-eventplot-demo-py | https://matplotlib.org/stable/_downloads/491e132174cc69dba0441dfe1697725d/eventplot_demo.py | eventplot_demo.py | lines_bars_and_markers | ok | 1 | null | |
"""
==============
Filled polygon
==============
`~.Axes.fill()` draws a filled polygon based on lists of point
coordinates *x*, *y*.
This example uses the `Koch snowflake`_ as an example polygon.
.. _Koch snowflake: https://en.wikipedia.org/wiki/Koch_snowflake
"""
import matplotlib.pyplot as plt
import numpy as n... | stable__gallery__lines_bars_and_markers__fill | 0 | figure_000.png | Filled polygon — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/lines_bars_and_markers/fill.html#sphx-glr-download-gallery-lines-bars-and-markers-fill-py | https://matplotlib.org/stable/_downloads/7c4bf2de06c94e0c6ae8aaa88b90ef22/fill.py | fill.py | lines_bars_and_markers | ok | 2 | null | |
"""
==================================
``fill_between`` with transparency
==================================
The `~matplotlib.axes.Axes.fill_between` function generates a shaded
region between a min and max boundary that is useful for illustrating ranges.
It has a very handy ``where`` argument to combine filling with ... | stable__gallery__lines_bars_and_markers__fill_between_alpha | 0 | figure_000.png | fill_between with transparency — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/lines_bars_and_markers/fill_between_alpha.html#sphx-glr-download-gallery-lines-bars-and-markers-fill-between-alpha-py | https://matplotlib.org/stable/_downloads/2a8eb74e039ed7cd390fd2e4ddd28e26/fill_between_alpha.py | fill_between_alpha.py | lines_bars_and_markers | ok | 3 | null | |
"""
==================================
``fill_between`` with transparency
==================================
The `~matplotlib.axes.Axes.fill_between` function generates a shaded
region between a min and max boundary that is useful for illustrating ranges.
It has a very handy ``where`` argument to combine filling with ... | stable__gallery__lines_bars_and_markers__fill_between_alpha | 1 | figure_001.png | fill_between with transparency — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/lines_bars_and_markers/fill_between_alpha.html#sphx-glr-download-gallery-lines-bars-and-markers-fill-between-alpha-py | https://matplotlib.org/stable/_downloads/2a8eb74e039ed7cd390fd2e4ddd28e26/fill_between_alpha.py | fill_between_alpha.py | lines_bars_and_markers | ok | 3 | null | |
"""
==================================
``fill_between`` with transparency
==================================
The `~matplotlib.axes.Axes.fill_between` function generates a shaded
region between a min and max boundary that is useful for illustrating ranges.
It has a very handy ``where`` argument to combine filling with ... | stable__gallery__lines_bars_and_markers__fill_between_alpha | 2 | figure_002.png | fill_between with transparency — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/lines_bars_and_markers/fill_between_alpha.html#sphx-glr-download-gallery-lines-bars-and-markers-fill-between-alpha-py | https://matplotlib.org/stable/_downloads/2a8eb74e039ed7cd390fd2e4ddd28e26/fill_between_alpha.py | fill_between_alpha.py | lines_bars_and_markers | ok | 3 | null | |
"""
===============================
Fill the area between two lines
===============================
This example shows how to use `~.axes.Axes.fill_between` to color the area
between two lines.
"""
import matplotlib.pyplot as plt
import numpy as np
# %%
#
# Basic usage
# -----------
# The parameters *y1* and *y2* ca... | stable__gallery__lines_bars_and_markers__fill_between_demo | 0 | figure_000.png | Fill the area between two lines — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/lines_bars_and_markers/fill_between_demo.html#sphx-glr-download-gallery-lines-bars-and-markers-fill-between-demo-py | https://matplotlib.org/stable/_downloads/264a8be4de96930763e780682bdaba2d/fill_between_demo.py | fill_between_demo.py | lines_bars_and_markers | ok | 4 | null | |
"""
===============================
Fill the area between two lines
===============================
This example shows how to use `~.axes.Axes.fill_between` to color the area
between two lines.
"""
import matplotlib.pyplot as plt
import numpy as np
# %%
#
# Basic usage
# -----------
# The parameters *y1* and *y2* ca... | stable__gallery__lines_bars_and_markers__fill_between_demo | 1 | figure_001.png | Fill the area between two lines — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/lines_bars_and_markers/fill_between_demo.html#sphx-glr-download-gallery-lines-bars-and-markers-fill-between-demo-py | https://matplotlib.org/stable/_downloads/264a8be4de96930763e780682bdaba2d/fill_between_demo.py | fill_between_demo.py | lines_bars_and_markers | ok | 4 | null | |
"""
===============================
Fill the area between two lines
===============================
This example shows how to use `~.axes.Axes.fill_between` to color the area
between two lines.
"""
import matplotlib.pyplot as plt
import numpy as np
# %%
#
# Basic usage
# -----------
# The parameters *y1* and *y2* ca... | stable__gallery__lines_bars_and_markers__fill_between_demo | 2 | figure_002.png | Fill the area between two lines — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/lines_bars_and_markers/fill_between_demo.html#sphx-glr-download-gallery-lines-bars-and-markers-fill-between-demo-py | https://matplotlib.org/stable/_downloads/264a8be4de96930763e780682bdaba2d/fill_between_demo.py | fill_between_demo.py | lines_bars_and_markers | ok | 4 | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.