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
""" =============================== 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
3
figure_003.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 vertical lines ======================================== Using `~.Axes.fill_betweenx` to color along the horizontal direction between two curves. """ import matplotlib.pyplot as plt import numpy as np y = np.arange(0.0, 2, 0.01) x1 = np.sin(2 * np....
stable__gallery__lines_bars_and_markers__fill_betweenx_demo
0
figure_000.png
Fill the area between two vertical lines — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/lines_bars_and_markers/fill_betweenx_demo.html#sphx-glr-download-gallery-lines-bars-and-markers-fill-betweenx-demo-py
https://matplotlib.org/stable/_downloads/25520da3172b0ab1766f2f0bd31a49f6/fill_betweenx_demo.py
fill_betweenx_demo.py
lines_bars_and_markers
ok
2
null
""" ======================================== Fill the area between two vertical lines ======================================== Using `~.Axes.fill_betweenx` to color along the horizontal direction between two curves. """ import matplotlib.pyplot as plt import numpy as np y = np.arange(0.0, 2, 0.01) x1 = np.sin(2 * np....
stable__gallery__lines_bars_and_markers__fill_betweenx_demo
1
figure_001.png
Fill the area between two vertical lines — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/lines_bars_and_markers/fill_betweenx_demo.html#sphx-glr-download-gallery-lines-bars-and-markers-fill-betweenx-demo-py
https://matplotlib.org/stable/_downloads/25520da3172b0ab1766f2f0bd31a49f6/fill_betweenx_demo.py
fill_betweenx_demo.py
lines_bars_and_markers
ok
2
null
""" ======================== Bar chart with gradients ======================== Matplotlib does not natively support gradients. However, we can emulate a gradient-filled rectangle by an `.AxesImage` of the right size and coloring. In particular, we use a colormap to generate the actual colors. It is then sufficient to...
stable__gallery__lines_bars_and_markers__gradient_bar
0
figure_000.png
Bar chart with gradients — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/lines_bars_and_markers/gradient_bar.html#sphx-glr-download-gallery-lines-bars-and-markers-gradient-bar-py
https://matplotlib.org/stable/_downloads/e83fa918d4012d4ca7e2bd48e7ab0935/gradient_bar.py
gradient_bar.py
lines_bars_and_markers
ok
1
null
""" ========= Hat graph ========= This example shows how to create a `hat graph`_ and how to annotate it with labels. .. _hat graph: https://doi.org/10.1186/s41235-019-0182-3 """ import matplotlib.pyplot as plt import numpy as np def hat_graph(ax, xlabels, values, group_labels): """ Create a hat graph. ...
stable__gallery__lines_bars_and_markers__hat_graph
0
figure_000.png
Hat graph — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/lines_bars_and_markers/hat_graph.html#sphx-glr-download-gallery-lines-bars-and-markers-hat-graph-py
https://matplotlib.org/stable/_downloads/ff9b887ec7665e75d3992d3af408be52/hat_graph.py
hat_graph.py
lines_bars_and_markers
ok
1
null
""" ============================================= Discrete distribution as horizontal bar chart ============================================= Stacked bar charts can be used to visualize discrete distributions. This example visualizes the result of a survey in which people could rate their agreement to questions on a ...
stable__gallery__lines_bars_and_markers__horizontal_barchart_distribution
0
figure_000.png
Discrete distribution as horizontal bar chart — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/lines_bars_and_markers/horizontal_barchart_distribution.html#sphx-glr-download-gallery-lines-bars-and-markers-horizontal-barchart-distribution-py
https://matplotlib.org/stable/_downloads/77d0d6c2d02582d80df43b9b9e78610c/horizontal_barchart_distribution.py
horizontal_barchart_distribution.py
lines_bars_and_markers
ok
1
null
""" ========= JoinStyle ========= The `matplotlib._enums.JoinStyle` controls how Matplotlib draws the corners where two different line segments meet. For more details, see the `~matplotlib._enums.JoinStyle` docs. """ import matplotlib.pyplot as plt from matplotlib._enums import JoinStyle JoinStyle.demo() plt.show()...
stable__gallery__lines_bars_and_markers__joinstyle
0
figure_000.png
JoinStyle — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/lines_bars_and_markers/joinstyle.html#sphx-glr-download-gallery-lines-bars-and-markers-joinstyle-py
https://matplotlib.org/stable/_downloads/6bb713e635f8898fbc28683331020d84/joinstyle.py
joinstyle.py
lines_bars_and_markers
ok
1
null
""" =============================== Dashed line style configuration =============================== The dashing of a line is controlled via a dash sequence. It can be modified using `.Line2D.set_dashes`. The dash sequence is a series of on/off lengths in points, e.g. ``[3, 1]`` would be 3pt long lines separated by 1p...
stable__gallery__lines_bars_and_markers__line_demo_dash_control
0
figure_000.png
Dashed line style configuration — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/lines_bars_and_markers/line_demo_dash_control.html#sphx-glr-download-gallery-lines-bars-and-markers-line-demo-dash-control-py
https://matplotlib.org/stable/_downloads/1c02700bb13e6571e774c10ba73db267/line_demo_dash_control.py
line_demo_dash_control.py
lines_bars_and_markers
ok
1
null
""" ============================== Lines with a ticked patheffect ============================== Ticks can be added along a line to mark one side as a barrier using `~matplotlib.patheffects.TickedStroke`. You can control the angle, spacing, and length of the ticks. The ticks will also appear appropriately in the leg...
stable__gallery__lines_bars_and_markers__lines_with_ticks_demo
0
figure_000.png
Lines with a ticked patheffect — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/lines_bars_and_markers/lines_with_ticks_demo.html#sphx-glr-download-gallery-lines-bars-and-markers-lines-with-ticks-demo-py
https://matplotlib.org/stable/_downloads/3269caad4b186ff2ba73f725b2cb5a12/lines_with_ticks_demo.py
lines_with_ticks_demo.py
lines_bars_and_markers
ok
1
null
""" ========== Linestyles ========== Simple linestyles can be defined using the strings "solid", "dotted", "dashed" or "dashdot". More refined control can be achieved by providing a dash tuple ``(offset, (on_off_seq))``. For example, ``(0, (3, 10, 1, 15))`` means (3pt line, 10pt space, 1pt line, 15pt space) with no of...
stable__gallery__lines_bars_and_markers__linestyles
0
figure_000.png
Linestyles — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/lines_bars_and_markers/linestyles.html#sphx-glr-download-gallery-lines-bars-and-markers-linestyles-py
https://matplotlib.org/stable/_downloads/79cca01aa25ff65b23b051f7e4ca55f5/linestyles.py
linestyles.py
lines_bars_and_markers
ok
1
null
""" ================ Marker reference ================ Matplotlib supports multiple categories of markers which are selected using the ``marker`` parameter of plot commands: - `Unfilled markers`_ - `Filled markers`_ - `Markers created from TeX symbols`_ - `Markers created from Paths`_ For a list of all markers see a...
stable__gallery__lines_bars_and_markers__marker_reference
0
figure_000.png
Marker reference — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/lines_bars_and_markers/marker_reference.html#unfilled-markers
https://matplotlib.org/stable/_downloads/af914017c64db37d6e814a5e9cdfb4a2/marker_reference.py
marker_reference.py
lines_bars_and_markers
ok
8
null
""" ================ Marker reference ================ Matplotlib supports multiple categories of markers which are selected using the ``marker`` parameter of plot commands: - `Unfilled markers`_ - `Filled markers`_ - `Markers created from TeX symbols`_ - `Markers created from Paths`_ For a list of all markers see a...
stable__gallery__lines_bars_and_markers__marker_reference
1
figure_001.png
Marker reference — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/lines_bars_and_markers/marker_reference.html#unfilled-markers
https://matplotlib.org/stable/_downloads/af914017c64db37d6e814a5e9cdfb4a2/marker_reference.py
marker_reference.py
lines_bars_and_markers
ok
8
null
""" ================ Marker reference ================ Matplotlib supports multiple categories of markers which are selected using the ``marker`` parameter of plot commands: - `Unfilled markers`_ - `Filled markers`_ - `Markers created from TeX symbols`_ - `Markers created from Paths`_ For a list of all markers see a...
stable__gallery__lines_bars_and_markers__marker_reference
2
figure_002.png
Marker reference — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/lines_bars_and_markers/marker_reference.html#unfilled-markers
https://matplotlib.org/stable/_downloads/af914017c64db37d6e814a5e9cdfb4a2/marker_reference.py
marker_reference.py
lines_bars_and_markers
ok
8
null
""" ================ Marker reference ================ Matplotlib supports multiple categories of markers which are selected using the ``marker`` parameter of plot commands: - `Unfilled markers`_ - `Filled markers`_ - `Markers created from TeX symbols`_ - `Markers created from Paths`_ For a list of all markers see a...
stable__gallery__lines_bars_and_markers__marker_reference
3
figure_003.png
Marker reference — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/lines_bars_and_markers/marker_reference.html#unfilled-markers
https://matplotlib.org/stable/_downloads/af914017c64db37d6e814a5e9cdfb4a2/marker_reference.py
marker_reference.py
lines_bars_and_markers
ok
8
null
""" ================ Marker reference ================ Matplotlib supports multiple categories of markers which are selected using the ``marker`` parameter of plot commands: - `Unfilled markers`_ - `Filled markers`_ - `Markers created from TeX symbols`_ - `Markers created from Paths`_ For a list of all markers see a...
stable__gallery__lines_bars_and_markers__marker_reference
4
figure_004.png
Marker reference — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/lines_bars_and_markers/marker_reference.html#unfilled-markers
https://matplotlib.org/stable/_downloads/af914017c64db37d6e814a5e9cdfb4a2/marker_reference.py
marker_reference.py
lines_bars_and_markers
ok
8
null
""" ================ Marker reference ================ Matplotlib supports multiple categories of markers which are selected using the ``marker`` parameter of plot commands: - `Unfilled markers`_ - `Filled markers`_ - `Markers created from TeX symbols`_ - `Markers created from Paths`_ For a list of all markers see a...
stable__gallery__lines_bars_and_markers__marker_reference
5
figure_005.png
Marker reference — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/lines_bars_and_markers/marker_reference.html#unfilled-markers
https://matplotlib.org/stable/_downloads/af914017c64db37d6e814a5e9cdfb4a2/marker_reference.py
marker_reference.py
lines_bars_and_markers
ok
8
null
""" ================ Marker reference ================ Matplotlib supports multiple categories of markers which are selected using the ``marker`` parameter of plot commands: - `Unfilled markers`_ - `Filled markers`_ - `Markers created from TeX symbols`_ - `Markers created from Paths`_ For a list of all markers see a...
stable__gallery__lines_bars_and_markers__marker_reference
6
figure_006.png
Marker reference — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/lines_bars_and_markers/marker_reference.html#unfilled-markers
https://matplotlib.org/stable/_downloads/af914017c64db37d6e814a5e9cdfb4a2/marker_reference.py
marker_reference.py
lines_bars_and_markers
ok
8
null
""" ================ Marker reference ================ Matplotlib supports multiple categories of markers which are selected using the ``marker`` parameter of plot commands: - `Unfilled markers`_ - `Filled markers`_ - `Markers created from TeX symbols`_ - `Markers created from Paths`_ For a list of all markers see a...
stable__gallery__lines_bars_and_markers__marker_reference
7
figure_007.png
Marker reference — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/lines_bars_and_markers/marker_reference.html#unfilled-markers
https://matplotlib.org/stable/_downloads/af914017c64db37d6e814a5e9cdfb4a2/marker_reference.py
marker_reference.py
lines_bars_and_markers
ok
8
null
""" ============== Markevery Demo ============== The ``markevery`` property of `.Line2D` allows drawing markers at a subset of data points. The list of possible parameters is specified at `.Line2D.set_markevery`. In short: - A single integer N draws every N-th marker. - A tuple of integers (start, N) draws every N-t...
stable__gallery__lines_bars_and_markers__markevery_demo
0
figure_000.png
Markevery Demo — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/lines_bars_and_markers/markevery_demo.html#sphx-glr-download-gallery-lines-bars-and-markers-markevery-demo-py
https://matplotlib.org/stable/_downloads/d4832f59edf5628fed3ec2eee2cecbf9/markevery_demo.py
markevery_demo.py
lines_bars_and_markers
ok
4
null
""" ============== Markevery Demo ============== The ``markevery`` property of `.Line2D` allows drawing markers at a subset of data points. The list of possible parameters is specified at `.Line2D.set_markevery`. In short: - A single integer N draws every N-th marker. - A tuple of integers (start, N) draws every N-t...
stable__gallery__lines_bars_and_markers__markevery_demo
1
figure_001.png
Markevery Demo — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/lines_bars_and_markers/markevery_demo.html#sphx-glr-download-gallery-lines-bars-and-markers-markevery-demo-py
https://matplotlib.org/stable/_downloads/d4832f59edf5628fed3ec2eee2cecbf9/markevery_demo.py
markevery_demo.py
lines_bars_and_markers
ok
4
null
""" ============== Markevery Demo ============== The ``markevery`` property of `.Line2D` allows drawing markers at a subset of data points. The list of possible parameters is specified at `.Line2D.set_markevery`. In short: - A single integer N draws every N-th marker. - A tuple of integers (start, N) draws every N-t...
stable__gallery__lines_bars_and_markers__markevery_demo
2
figure_002.png
Markevery Demo — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/lines_bars_and_markers/markevery_demo.html#sphx-glr-download-gallery-lines-bars-and-markers-markevery-demo-py
https://matplotlib.org/stable/_downloads/d4832f59edf5628fed3ec2eee2cecbf9/markevery_demo.py
markevery_demo.py
lines_bars_and_markers
ok
4
null
""" ============== Markevery Demo ============== The ``markevery`` property of `.Line2D` allows drawing markers at a subset of data points. The list of possible parameters is specified at `.Line2D.set_markevery`. In short: - A single integer N draws every N-th marker. - A tuple of integers (start, N) draws every N-t...
stable__gallery__lines_bars_and_markers__markevery_demo
3
figure_003.png
Markevery Demo — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/lines_bars_and_markers/markevery_demo.html#sphx-glr-download-gallery-lines-bars-and-markers-markevery-demo-py
https://matplotlib.org/stable/_downloads/d4832f59edf5628fed3ec2eee2cecbf9/markevery_demo.py
markevery_demo.py
lines_bars_and_markers
ok
4
null
""" ============================== Plotting masked and NaN values ============================== Sometimes you need to plot data with missing values. One possibility is to simply remove undesired data points. The line plotted through the remaining data will be continuous, and not indicate where the missing data is lo...
stable__gallery__lines_bars_and_markers__masked_demo
0
figure_000.png
Plotting masked and NaN values — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/lines_bars_and_markers/masked_demo.html#sphx-glr-download-gallery-lines-bars-and-markers-masked-demo-py
https://matplotlib.org/stable/_downloads/285cf9001b13973e75842eb0b810371f/masked_demo.py
masked_demo.py
lines_bars_and_markers
ok
1
null
""" ================== Multicolored lines ================== The example shows two ways to plot a line with the a varying color defined by a third value. The first example defines the color at each (x, y) point. The second example defines the color between pairs of points, so the length of the color value list is one ...
stable__gallery__lines_bars_and_markers__multicolored_line
0
figure_000.png
Multicolored lines — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/lines_bars_and_markers/multicolored_line.html#sphx-glr-download-gallery-lines-bars-and-markers-multicolored-line-py
https://matplotlib.org/stable/_downloads/dde8bce4a3266a4b3702098ddc49f236/multicolored_line.py
multicolored_line.py
lines_bars_and_markers
ok
3
null
""" ============================================== Mapping marker properties to multivariate data ============================================== This example shows how to use different properties of markers to plot multivariate datasets. Here we represent a successful baseball throw as a smiley face with marker size m...
stable__gallery__lines_bars_and_markers__multivariate_marker_plot
0
figure_000.png
Mapping marker properties to multivariate data — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/lines_bars_and_markers/multivariate_marker_plot.html#sphx-glr-download-gallery-lines-bars-and-markers-multivariate-marker-plot-py
https://matplotlib.org/stable/_downloads/0c9f82be1ea4cded0763a4430f4a0e83/multivariate_marker_plot.py
multivariate_marker_plot.py
lines_bars_and_markers
ok
1
null
""" ============================ Power spectral density (PSD) ============================ Plotting power spectral density (PSD) using `~.Axes.psd`. The PSD is a common plot in the field of signal processing. NumPy has many useful libraries for computing a PSD. Below we demo a few examples of how this can be accompli...
stable__gallery__lines_bars_and_markers__psd_demo
0
figure_000.png
Power spectral density (PSD) — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/lines_bars_and_markers/psd_demo.html#sphx-glr-download-gallery-lines-bars-and-markers-psd-demo-py
https://matplotlib.org/stable/_downloads/5297dff52c244336df5a0ee552a4abbf/psd_demo.py
psd_demo.py
lines_bars_and_markers
ok
4
null
""" ============= Scatter Demo2 ============= Demo of scatter plot with varying marker colors and sizes. """ import matplotlib.pyplot as plt import numpy as np import matplotlib.cbook as cbook # Load a numpy record array from yahoo csv data with fields date, open, high, # low, close, volume, adj_close from the mpl-d...
stable__gallery__lines_bars_and_markers__scatter_demo2
0
figure_000.png
Scatter Demo2 — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/lines_bars_and_markers/scatter_demo2.html#sphx-glr-download-gallery-lines-bars-and-markers-scatter-demo2-py
https://matplotlib.org/stable/_downloads/5b9eb7dec3f843b16e67ad82e4647a08/scatter_demo2.py
scatter_demo2.py
lines_bars_and_markers
ok
1
null
""" ============================ Scatter plot with histograms ============================ Add histograms to the x-axes and y-axes margins of a scatter plot. This layout features a central scatter plot illustrating the relationship between x and y, a histogram at the top displaying the distribution of x, and a histog...
stable__gallery__lines_bars_and_markers__scatter_hist
0
figure_000.png
Scatter plot with histograms — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/lines_bars_and_markers/scatter_hist.html#sphx-glr-download-gallery-lines-bars-and-markers-scatter-hist-py
https://matplotlib.org/stable/_downloads/3e1134ffd2662d0ad0c453c6dfb7882d/scatter_hist.py
scatter_hist.py
lines_bars_and_markers
ok
2
null
""" ============================ Scatter plot with histograms ============================ Add histograms to the x-axes and y-axes margins of a scatter plot. This layout features a central scatter plot illustrating the relationship between x and y, a histogram at the top displaying the distribution of x, and a histog...
stable__gallery__lines_bars_and_markers__scatter_hist
1
figure_001.png
Scatter plot with histograms — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/lines_bars_and_markers/scatter_hist.html#sphx-glr-download-gallery-lines-bars-and-markers-scatter-hist-py
https://matplotlib.org/stable/_downloads/3e1134ffd2662d0ad0c453c6dfb7882d/scatter_hist.py
scatter_hist.py
lines_bars_and_markers
ok
2
null
""" =============================== Scatter plot with masked values =============================== Mask some data points and add a line demarking masked regions. """ import matplotlib.pyplot as plt import numpy as np # Fixing random state for reproducibility np.random.seed(19680801) N = 100 r0 = 0.6 x = 0.9 * np....
stable__gallery__lines_bars_and_markers__scatter_masked
0
figure_000.png
Scatter plot with masked values — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/lines_bars_and_markers/scatter_masked.html#sphx-glr-download-gallery-lines-bars-and-markers-scatter-masked-py
https://matplotlib.org/stable/_downloads/68d80e3d1e3f3561a71b3e5c8efae907/scatter_masked.py
scatter_masked.py
lines_bars_and_markers
ok
1
null
""" =============== Marker examples =============== Example with different ways to specify markers. See also the `matplotlib.markers` documentation for a list of all markers and :doc:`/gallery/lines_bars_and_markers/marker_reference` for more information on configuring markers. .. redirect-from:: /gallery/lines_bars...
stable__gallery__lines_bars_and_markers__scatter_star_poly
0
figure_000.png
Marker examples — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/lines_bars_and_markers/scatter_star_poly.html#sphx-glr-download-gallery-lines-bars-and-markers-scatter-star-poly-py
https://matplotlib.org/stable/_downloads/bec52923c4e8bde35b6455fdff6def07/scatter_star_poly.py
scatter_star_poly.py
lines_bars_and_markers
ok
1
null
""" ========================== Scatter plot with a legend ========================== To create a scatter plot with a legend one may use a loop and create one `~.Axes.scatter` plot per item to appear in the legend and set the ``label`` accordingly. The following also demonstrates how transparency of the markers can be...
stable__gallery__lines_bars_and_markers__scatter_with_legend
0
figure_000.png
Scatter plot with a legend — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/lines_bars_and_markers/scatter_with_legend.html#sphx-glr-download-gallery-lines-bars-and-markers-scatter-with-legend-py
https://matplotlib.org/stable/_downloads/e296fc40ba715311fdebebae0ecf1c71/scatter_with_legend.py
scatter_with_legend.py
lines_bars_and_markers
ok
3
null
""" ========= Line plot ========= Create a basic line plot. """ import matplotlib.pyplot as plt import numpy as np # Data for plotting t = np.arange(0.0, 2.0, 0.01) s = 1 + np.sin(2 * np.pi * t) fig, ax = plt.subplots() ax.plot(t, s) ax.set(xlabel='time (s)', ylabel='voltage (mV)', title='About as simple as...
stable__gallery__lines_bars_and_markers__simple_plot
0
figure_000.png
Line plot — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/lines_bars_and_markers/simple_plot.html#sphx-glr-download-gallery-lines-bars-and-markers-simple-plot-py
https://matplotlib.org/stable/_downloads/841352d8ea6065fce570abdf6225ef02/simple_plot.py
simple_plot.py
lines_bars_and_markers
ok
1
null
""" ========================================================== Shade regions defined by a logical mask using fill_between ========================================================== """ import matplotlib.pyplot as plt import numpy as np t = np.arange(0.0, 2, 0.01) s = np.sin(2*np.pi*t) fig, ax = plt.subplots() ax.pl...
stable__gallery__lines_bars_and_markers__span_regions
0
figure_000.png
Shade regions defined by a logical mask using fill_between — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/lines_bars_and_markers/span_regions.html#sphx-glr-download-gallery-lines-bars-and-markers-span-regions-py
https://matplotlib.org/stable/_downloads/ae69400014c751155c2d298248eb41e6/span_regions.py
span_regions.py
lines_bars_and_markers
ok
1
null
""" ======================== Spectrum representations ======================== The plots show different spectrum representations of a sine signal with additive noise. A (frequency) spectrum of a discrete-time signal is calculated by utilizing the fast Fourier transform (FFT). """ import matplotlib.pyplot as plt import...
stable__gallery__lines_bars_and_markers__spectrum_demo
0
figure_000.png
Spectrum representations — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/lines_bars_and_markers/spectrum_demo.html#sphx-glr-download-gallery-lines-bars-and-markers-spectrum-demo-py
https://matplotlib.org/stable/_downloads/b8c57e62999229824f455e779d286772/spectrum_demo.py
spectrum_demo.py
lines_bars_and_markers
ok
1
null
""" =========================== Stackplots and streamgraphs =========================== """ # %% # Stackplots # ---------- # # Stackplots draw multiple datasets as vertically stacked areas. This is # useful when the individual data values and additionally their cumulative # value are of interest. import matplotlib.p...
stable__gallery__lines_bars_and_markers__stackplot_demo
0
figure_000.png
Stackplots and streamgraphs — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/lines_bars_and_markers/stackplot_demo.html#streamgraphs
https://matplotlib.org/stable/_downloads/a4ca2d398a778f09d428679d85cdef43/stackplot_demo.py
stackplot_demo.py
lines_bars_and_markers
ok
2
null
""" =========== Stairs Demo =========== This example demonstrates the use of `~.matplotlib.pyplot.stairs` for stepwise constant functions. A common use case is histogram and histogram-like data visualization. """ import matplotlib.pyplot as plt import numpy as np from matplotlib.patches import StepPatch np.random....
stable__gallery__lines_bars_and_markers__stairs_demo
0
figure_000.png
Stairs Demo — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/lines_bars_and_markers/stairs_demo.html#stairs-demo
https://matplotlib.org/stable/_downloads/99b2228ef8ead5b15771558e042ee4f3/stairs_demo.py
stairs_demo.py
lines_bars_and_markers
ok
2
null
""" ========= Stem plot ========= `~.pyplot.stem` plots vertical lines from a baseline to the y-coordinate and places a marker at the tip. """ import matplotlib.pyplot as plt import numpy as np x = np.linspace(0.1, 2 * np.pi, 41) y = np.exp(np.sin(x)) plt.stem(x, y) plt.show() # %% # # The position of the baseline ...
stable__gallery__lines_bars_and_markers__stem_plot
0
figure_000.png
Stem plot — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/lines_bars_and_markers/stem_plot.html#stem-plot
https://matplotlib.org/stable/_downloads/605cad767f8ac8bf813bcd4941015322/stem_plot.py
stem_plot.py
lines_bars_and_markers
ok
2
null
""" ========= Step Demo ========= This example demonstrates the use of `.pyplot.step` for piece-wise constant curves. In particular, it illustrates the effect of the parameter *where* on the step position. .. note:: For the common case that you know the edge positions, use `.pyplot.stairs` instead. The circ...
stable__gallery__lines_bars_and_markers__step_demo
0
figure_000.png
Step Demo — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/lines_bars_and_markers/step_demo.html#step-demo
https://matplotlib.org/stable/_downloads/f8a42a328abce5e8455725246cb68710/step_demo.py
step_demo.py
lines_bars_and_markers
ok
2
null
""" ==================================== Timeline with lines, dates, and text ==================================== How to create a simple timeline using Matplotlib release dates. Timelines can be created with a collection of dates and text. In this example, we show how to create a simple timeline using the dates for ...
stable__gallery__lines_bars_and_markers__timeline
0
figure_000.png
Timeline with lines, dates, and text — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/lines_bars_and_markers/timeline.html#timeline-with-lines-dates-and-text
https://matplotlib.org/stable/_downloads/e4e3bbd0b1c82e93b916e64bd632f7a9/timeline.py
timeline.py
lines_bars_and_markers
ok
1
null
""" ================= hlines and vlines ================= This example showcases the functions hlines and vlines. """ import matplotlib.pyplot as plt import numpy as np # Fixing random state for reproducibility np.random.seed(19680801) t = np.arange(0.0, 5.0, 0.1) s = np.exp(-t) + np.sin(2 * np.pi * t) + 1 nse = np...
stable__gallery__lines_bars_and_markers__vline_hline_demo
0
figure_000.png
hlines and vlines — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/lines_bars_and_markers/vline_hline_demo.html#sphx-glr-download-gallery-lines-bars-and-markers-vline-hline-demo-py
https://matplotlib.org/stable/_downloads/fcbc14b23962009bcf6e5a7d52e939c8/vline_hline_demo.py
vline_hline_demo.py
lines_bars_and_markers
ok
1
null
""" =========================== Cross- and auto-correlation =========================== Example use of cross-correlation (`~.Axes.xcorr`) and auto-correlation (`~.Axes.acorr`) plots. """ import matplotlib.pyplot as plt import numpy as np # Fixing random state for reproducibility np.random.seed(19680801) x, y = np.r...
stable__gallery__lines_bars_and_markers__xcorr_acorr_demo
0
figure_000.png
Cross- and auto-correlation — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/lines_bars_and_markers/xcorr_acorr_demo.html#sphx-glr-download-gallery-lines-bars-and-markers-xcorr-acorr-demo-py
https://matplotlib.org/stable/_downloads/fad6b154bf9cffbaaac152da639e6889/xcorr_acorr_demo.py
xcorr_acorr_demo.py
lines_bars_and_markers
ok
1
null
""" ================ Anchored Artists ================ This example illustrates the use of the anchored objects without the helper classes found in :mod:`mpl_toolkits.axes_grid1`. This version of the figure is similar to the one found in :doc:`/gallery/axes_grid1/simple_anchored_artists`, but it is implemented using o...
stable__gallery__misc__anchored_artists
0
figure_000.png
Anchored Artists — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/misc/anchored_artists.html#sphx-glr-download-gallery-misc-anchored-artists-py
https://matplotlib.org/stable/_downloads/56dd8a42c5506d6f4b030f191ab55a38/anchored_artists.py
anchored_artists.py
misc
ok
1
null
""" ================================== Identify whether artists intersect ================================== The lines intersecting the rectangle are colored in red, while the others are left as blue lines. This example showcases the `.intersects_bbox` function. """ import matplotlib.pyplot as plt import numpy as np...
stable__gallery__misc__bbox_intersect
0
figure_000.png
Identify whether artists intersect — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/misc/bbox_intersect.html#sphx-glr-gallery-misc-bbox-intersect-py
https://matplotlib.org/stable/_downloads/832476b1f1a894c408ecb93acb7b935c/bbox_intersect.py
bbox_intersect.py
misc
ok
1
null
""" ============== Manual Contour ============== Example of displaying your own contour lines and polygons using ContourSet. """ import matplotlib.pyplot as plt import matplotlib.cm as cm from matplotlib.contour import ContourSet from matplotlib.path import Path # %% # Contour lines for each level are a list/tuple ...
stable__gallery__misc__contour_manual
0
figure_000.png
Manual Contour — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/misc/contour_manual.html#sphx-glr-download-gallery-misc-contour-manual-py
https://matplotlib.org/stable/_downloads/6f6ddec07749bdbe4eea6b25d5dc81a6/contour_manual.py
contour_manual.py
misc
ok
2
null
""" ============== Manual Contour ============== Example of displaying your own contour lines and polygons using ContourSet. """ import matplotlib.pyplot as plt import matplotlib.cm as cm from matplotlib.contour import ContourSet from matplotlib.path import Path # %% # Contour lines for each level are a list/tuple ...
stable__gallery__misc__contour_manual
1
figure_001.png
Manual Contour — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/misc/contour_manual.html#sphx-glr-download-gallery-misc-contour-manual-py
https://matplotlib.org/stable/_downloads/6f6ddec07749bdbe4eea6b25d5dc81a6/contour_manual.py
contour_manual.py
misc
ok
2
null
""" ============= Coords Report ============= Override the default reporting of coords as the mouse moves over the Axes in an interactive backend. """ import matplotlib.pyplot as plt import numpy as np def millions(x): return '$%1.1fM' % (x * 1e-6) # Fixing random state for reproducibility np.random.seed(1968...
stable__gallery__misc__coords_report
0
figure_000.png
Coords Report — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/misc/coords_report.html#sphx-glr-download-gallery-misc-coords-report-py
https://matplotlib.org/stable/_downloads/3cf562cde19e200420cb83f024dd891a/coords_report.py
coords_report.py
misc
ok
1
null
""" ================= Custom projection ================= Showcase Hammer projection by alleviating many features of Matplotlib. """ import numpy as np import matplotlib from matplotlib.axes import Axes import matplotlib.axis as maxis from matplotlib.patches import Circle from matplotlib.path import Path from matplo...
stable__gallery__misc__custom_projection
0
figure_000.png
Custom projection — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/misc/custom_projection.html#sphx-glr-download-gallery-misc-custom-projection-py
https://matplotlib.org/stable/_downloads/2de7d801cc807aadc92f195e3402760b/custom_projection.py
custom_projection.py
misc
ok
1
null
""" ============ Customize Rc ============ I'm not trying to make a good-looking figure here, but just to show some examples of customizing `.rcParams` on the fly. If you like to work interactively, and need to create different sets of defaults for figures (e.g., one set of defaults for publication, one set for inter...
stable__gallery__misc__customize_rc
0
figure_000.png
Customize Rc — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/misc/customize_rc.html#sphx-glr-download-gallery-misc-customize-rc-py
https://matplotlib.org/stable/_downloads/d10d0de4c4efa82daca1fa3f98c048cd/customize_rc.py
customize_rc.py
misc
ok
1
null
""" ========== AGG filter ========== Most pixel-based backends in Matplotlib use `Anti-Grain Geometry (AGG)`_ for rendering. You can modify the rendering of Artists by applying a filter via `.Artist.set_agg_filter`. .. _Anti-Grain Geometry (AGG): http://agg.sourceforge.net/antigrain.com """ import matplotlib.pyplot ...
stable__gallery__misc__demo_agg_filter
0
figure_000.png
AGG filter — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/misc/demo_agg_filter.html#sphx-glr-download-gallery-misc-demo-agg-filter-py
https://matplotlib.org/stable/_downloads/5787bdd3c2fb5d84c40860c89508a642/demo_agg_filter.py
demo_agg_filter.py
misc
ok
1
null
""" ========== Ribbon box ========== """ import matplotlib.pyplot as plt import numpy as np from matplotlib import cbook from matplotlib import colors as mcolors from matplotlib.image import AxesImage from matplotlib.transforms import Bbox, BboxTransformTo, TransformedBbox class RibbonBox: original_image = pl...
stable__gallery__misc__demo_ribbon_box
0
figure_000.png
Ribbon box — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/misc/demo_ribbon_box.html#sphx-glr-download-gallery-misc-demo-ribbon-box-py
https://matplotlib.org/stable/_downloads/c7b27332a2e53923edb7ffb5315d4fa3/demo_ribbon_box.py
demo_ribbon_box.py
misc
ok
1
null
""" ============================== Add lines directly to a figure ============================== You can add artists such as a `.Line2D` directly to a figure. This is typically useful for visual structuring. .. redirect-from:: /gallery/pyplots/fig_x """ import matplotlib.pyplot as plt import matplotlib.lines as lin...
stable__gallery__misc__fig_x
0
figure_000.png
Add lines directly to a figure — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/misc/fig_x.html#sphx-glr-download-gallery-misc-fig-x-py
https://matplotlib.org/stable/_downloads/9081f921ee64a1df1186094d7dd9a8d3/fig_x.py
fig_x.py
misc
ok
1
null
""" =========== Fill spiral =========== """ import matplotlib.pyplot as plt import numpy as np theta = np.arange(0, 8*np.pi, 0.1) a = 1 b = .2 for dt in np.arange(0, 2*np.pi, np.pi/2.0): x = a*np.cos(theta + dt)*np.exp(b*theta) y = a*np.sin(theta + dt)*np.exp(b*theta) dt = dt + np.pi/4.0 x2 = a*np...
stable__gallery__misc__fill_spiral
0
figure_000.png
Fill spiral — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/misc/fill_spiral.html#sphx-glr-download-gallery-misc-fill-spiral-py
https://matplotlib.org/stable/_downloads/61f5d448be497db6a30387b809ee77d1/fill_spiral.py
fill_spiral.py
misc
ok
1
null
""" ============ Findobj Demo ============ Recursively find all objects that match some criteria """ import matplotlib.pyplot as plt import numpy as np import matplotlib.text as text a = np.arange(0, 3, .02) b = np.arange(0, 3, .02) c = np.exp(a) d = c[::-1] fig, ax = plt.subplots() plt.plot(a, c, 'k--', a, d, 'k:'...
stable__gallery__misc__findobj_demo
0
figure_000.png
Findobj Demo — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/misc/findobj_demo.html#sphx-glr-download-gallery-misc-findobj-demo-py
https://matplotlib.org/stable/_downloads/4095e40bfdaeea40b5ebf921dca65a60/findobj_demo.py
findobj_demo.py
misc
ok
1
null
""" ======================================================== Building histograms using Rectangles and PolyCollections ======================================================== Using a path patch to draw rectangles. The technique of using lots of `.Rectangle` instances, or the faster method of using `.PolyCollection`, ...
stable__gallery__misc__histogram_path
0
figure_000.png
Building histograms using Rectangles and PolyCollections — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/misc/histogram_path.html#sphx-glr-download-gallery-misc-histogram-path-py
https://matplotlib.org/stable/_downloads/5397c6ff8f61d4375f2fa83fa0eaf135/histogram_path.py
histogram_path.py
misc
ok
2
null
""" ========== Hyperlinks ========== This example demonstrates how to set a hyperlinks on various kinds of elements. This currently only works with the SVG backend. """ import matplotlib.pyplot as plt import numpy as np import matplotlib.cm as cm # %% fig = plt.figure() s = plt.scatter([1, 2, 3], [4, 5, 6]) s.s...
stable__gallery__misc__hyperlinks_sgskip
0
figure_000.png
Hyperlinks — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/misc/hyperlinks_sgskip.html#sphx-glr-download-gallery-misc-hyperlinks-sgskip-py
https://matplotlib.org/stable/_downloads/00c94fd2ec27d6cef4b040acefbf730d/hyperlinks_sgskip.py
hyperlinks_sgskip.py
misc
ok
2
null
""" ========== Hyperlinks ========== This example demonstrates how to set a hyperlinks on various kinds of elements. This currently only works with the SVG backend. """ import matplotlib.pyplot as plt import numpy as np import matplotlib.cm as cm # %% fig = plt.figure() s = plt.scatter([1, 2, 3], [4, 5, 6]) s.s...
stable__gallery__misc__hyperlinks_sgskip
1
figure_001.png
Hyperlinks — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/misc/hyperlinks_sgskip.html#sphx-glr-download-gallery-misc-hyperlinks-sgskip-py
https://matplotlib.org/stable/_downloads/00c94fd2ec27d6cef4b040acefbf730d/hyperlinks_sgskip.py
hyperlinks_sgskip.py
misc
ok
2
null
""" ====================== Plotting with keywords ====================== Some data structures, like dict, `structured numpy array <https://numpy.org/doc/stable/user/basics.rec.html#structured-arrays>`_ or `pandas.DataFrame` provide access to labelled data via string index access ``data[key]``. For these data types, M...
stable__gallery__misc__keyword_plotting
0
figure_000.png
Plotting with keywords — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/misc/keyword_plotting.html#sphx-glr-download-gallery-misc-keyword-plotting-py
https://matplotlib.org/stable/_downloads/0c0bceec5b66dc4841d06be6852509dc/keyword_plotting.py
keyword_plotting.py
misc
ok
1
null
""" =============== Matplotlib logo =============== This example generates the current matplotlib logo. """ import matplotlib.pyplot as plt import numpy as np import matplotlib.cm as cm import matplotlib.font_manager from matplotlib.patches import PathPatch, Rectangle from matplotlib.text import TextPath import matp...
stable__gallery__misc__logos2
0
figure_000.png
Matplotlib logo — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/misc/logos2.html#sphx-glr-download-gallery-misc-logos2-py
https://matplotlib.org/stable/_downloads/0846c3e5d114c457e124451aea9e558a/logos2.py
logos2.py
misc
ok
3
null
""" =============== Matplotlib logo =============== This example generates the current matplotlib logo. """ import matplotlib.pyplot as plt import numpy as np import matplotlib.cm as cm import matplotlib.font_manager from matplotlib.patches import PathPatch, Rectangle from matplotlib.text import TextPath import matp...
stable__gallery__misc__logos2
1
figure_001.png
Matplotlib logo — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/misc/logos2.html#sphx-glr-download-gallery-misc-logos2-py
https://matplotlib.org/stable/_downloads/0846c3e5d114c457e124451aea9e558a/logos2.py
logos2.py
misc
ok
3
null
""" =============== Matplotlib logo =============== This example generates the current matplotlib logo. """ import matplotlib.pyplot as plt import numpy as np import matplotlib.cm as cm import matplotlib.font_manager from matplotlib.patches import PathPatch, Rectangle from matplotlib.text import TextPath import matp...
stable__gallery__misc__logos2
2
figure_002.png
Matplotlib logo — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/misc/logos2.html#sphx-glr-download-gallery-misc-logos2-py
https://matplotlib.org/stable/_downloads/0846c3e5d114c457e124451aea9e558a/logos2.py
logos2.py
misc
ok
3
null
""" =================== Packed-bubble chart =================== Create a packed-bubble chart to represent scalar data. The presented algorithm tries to move all bubbles as close to the center of mass as possible while avoiding some collisions by moving around colliding objects. In this example we plot the market share...
stable__gallery__misc__packed_bubbles
0
figure_000.png
Packed-bubble chart — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/misc/packed_bubbles.html#sphx-glr-download-gallery-misc-packed-bubbles-py
https://matplotlib.org/stable/_downloads/81bc179821dc9808604c256bcb20b3b0/packed_bubbles.py
packed_bubbles.py
misc
ok
1
null
""" =============== Patheffect Demo =============== """ import matplotlib.pyplot as plt import numpy as np from matplotlib import patheffects fig, (ax1, ax2, ax3) = plt.subplots(1, 3, figsize=(8, 3)) ax1.imshow([[1, 2], [2, 3]]) txt = ax1.annotate("test", (1., 1.), (0., 0), arrowprops=dict(arrowst...
stable__gallery__misc__patheffect_demo
0
figure_000.png
Patheffect Demo — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/misc/patheffect_demo.html#sphx-glr-download-gallery-misc-patheffect-demo-py
https://matplotlib.org/stable/_downloads/1403c9176f441d71ec67e54e239b695e/patheffect_demo.py
patheffect_demo.py
misc
ok
1
null
""" ================================= Rasterization for vector graphics ================================= Rasterization converts vector graphics into a raster image (pixels). It can speed up rendering and produce smaller files for large data sets, but comes at the cost of a fixed resolution. Whether rasterization sho...
stable__gallery__misc__rasterization_demo
0
figure_000.png
Rasterization for vector graphics — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/misc/rasterization_demo.html#sphx-glr-download-gallery-misc-rasterization-demo-py
https://matplotlib.org/stable/_downloads/7aecd0ee1c8d945fad9779db5ebd3185/rasterization_demo.py
rasterization_demo.py
misc
ok
1
null
""" ====================== Set and get properties ====================== The pyplot interface allows you to use ``setp`` and ``getp`` to set and get object properties respectively, as well as to do introspection on the object. Setting with ``setp`` ===================== To set the linestyle of a line to be dashed, y...
stable__gallery__misc__set_and_get
0
figure_000.png
Set and get properties — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/misc/set_and_get.html#sphx-glr-download-gallery-misc-set-and-get-py
https://matplotlib.org/stable/_downloads/1164b1c779f1bc16a7184125264f2b1a/set_and_get.py
set_and_get.py
misc
ok
1
null
""" ========================== Apply SVG filter to a line ========================== Demonstrate SVG filtering effects which might be used with Matplotlib. Note that the filtering effects are only effective if your SVG renderer support it. """ import io import xml.etree.ElementTree as ET import matplotlib.pyplot as...
stable__gallery__misc__svg_filter_line
0
figure_000.png
Apply SVG filter to a line — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/misc/svg_filter_line.html#sphx-glr-download-gallery-misc-svg-filter-line-py
https://matplotlib.org/stable/_downloads/9f8aa7731c3c1bf0306b6dce55bacda0/svg_filter_line.py
svg_filter_line.py
misc
ok
1
null
""" ============== SVG filter pie ============== Demonstrate SVG filtering effects which might be used with Matplotlib. The pie chart drawing code is borrowed from pie_demo.py Note that the filtering effects are only effective if your SVG renderer support it. """ import io import xml.etree.ElementTree as ET import ...
stable__gallery__misc__svg_filter_pie
0
figure_000.png
SVG filter pie — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/misc/svg_filter_pie.html#svg-filter-pie
https://matplotlib.org/stable/_downloads/15ebd41aec6ebf084ad5797ba93359e4/svg_filter_pie.py
svg_filter_pie.py
misc
ok
1
null
""" ========== Table Demo ========== Demo of table function to display a table within a plot. """ import matplotlib.pyplot as plt import numpy as np data = [[ 66386, 174296, 75131, 577908, 32015], [ 58230, 381139, 78045, 99308, 160454], [ 89135, 80552, 152558, 497981, 603535], [ 78415, 8...
stable__gallery__misc__table_demo
0
figure_000.png
Table Demo — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/misc/table_demo.html#table-demo
https://matplotlib.org/stable/_downloads/017058e784e2a359b3a7dd004a3e0379/table_demo.py
table_demo.py
misc
ok
1
null
""" ======================= TickedStroke patheffect ======================= Matplotlib's :mod:`.patheffects` can be used to alter the way paths are drawn at a low enough level that they can affect almost anything. The :ref:`patheffects guide<patheffects_guide>` details the use of patheffects. The `~matplotlib.pathef...
stable__gallery__misc__tickedstroke_demo
0
figure_000.png
TickedStroke patheffect — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/misc/tickedstroke_demo.html#tickedstroke-patheffect
https://matplotlib.org/stable/_downloads/ee238568c97acaa88c1fecf30916a9a7/tickedstroke_demo.py
tickedstroke_demo.py
misc
ok
4
null
""" ====================== transforms.offset_copy ====================== This illustrates the use of `.transforms.offset_copy` to make a transform that positions a drawing element such as a text string at a specified offset in screen coordinates (dots or inches) relative to a location given in any coordinates. Every ...
stable__gallery__misc__transoffset
0
figure_000.png
transforms.offset_copy — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/misc/transoffset.html#transforms-offset-copy
https://matplotlib.org/stable/_downloads/51f71780b1f0e8c2b3d14e33ae33f05f/transoffset.py
transoffset.py
misc
ok
1
null
""" =========== Zorder Demo =========== The drawing order of artists is determined by their ``zorder`` attribute, which is a floating point number. Artists with higher ``zorder`` are drawn on top. You can change the order for individual artists by setting their ``zorder``. The default value depends on the type of the ...
stable__gallery__misc__zorder_demo
0
figure_000.png
Zorder Demo — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/misc/zorder_demo.html#zorder-demo
https://matplotlib.org/stable/_downloads/1f573e76544733470b40b7cc1018cdb9/zorder_demo.py
zorder_demo.py
misc
ok
2
null
""" =========== Zorder Demo =========== The drawing order of artists is determined by their ``zorder`` attribute, which is a floating point number. Artists with higher ``zorder`` are drawn on top. You can change the order for individual artists by setting their ``zorder``. The default value depends on the type of the ...
stable__gallery__misc__zorder_demo
1
figure_001.png
Zorder Demo — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/misc/zorder_demo.html#zorder-demo
https://matplotlib.org/stable/_downloads/1f573e76544733470b40b7cc1018cdb9/zorder_demo.py
zorder_demo.py
misc
ok
2
null
""" ======================= Plot 2D data on 3D plot ======================= Demonstrates using ax.plot's *zdir* keyword to plot 2D data on selective axes of a 3D plot. """ import matplotlib.pyplot as plt import numpy as np ax = plt.figure().add_subplot(projection='3d') # Plot a sin curve using the x and y axes. x =...
stable__gallery__mplot3d__2dcollections3d
0
figure_000.png
Plot 2D data on 3D plot — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/mplot3d/2dcollections3d.html#sphx-glr-download-gallery-mplot3d-2dcollections3d-py
https://matplotlib.org/stable/_downloads/82806b819d5516f91bb92a2c94296201/2dcollections3d.py
2dcollections3d.py
mplot3d
ok
1
null
""" ===================== Demo of 3D bar charts ===================== A basic demo of how to plot 3D bars with and without shading. """ import matplotlib.pyplot as plt import numpy as np # set up the figure and Axes fig = plt.figure(figsize=(8, 3)) ax1 = fig.add_subplot(121, projection='3d') ax2 = fig.add_subplot(12...
stable__gallery__mplot3d__3d_bars
0
figure_000.png
Demo of 3D bar charts — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/mplot3d/3d_bars.html#sphx-glr-download-gallery-mplot3d-3d-bars-py
https://matplotlib.org/stable/_downloads/b2426003d482f6dc8125fd971aafd3d4/3d_bars.py
3d_bars.py
mplot3d
ok
1
null
""" ===================================== Clip the data to the axes view limits ===================================== Demonstrate clipping of line and marker data to the axes view limits. The ``axlim_clip`` keyword argument can be used in any of the 3D plotting functions. """ import matplotlib.pyplot as plt import nu...
stable__gallery__mplot3d__axlim_clip
0
figure_000.png
Clip the data to the axes view limits — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/mplot3d/axlim_clip.html#sphx-glr-download-gallery-mplot3d-axlim-clip-py
https://matplotlib.org/stable/_downloads/69439e0cb9599c9022501fdf410371ff/axlim_clip.py
axlim_clip.py
mplot3d
ok
1
null
""" ======================================== Create 2D bar graphs in different planes ======================================== Demonstrates making a 3D plot which has 2D bar graphs projected onto planes y=0, y=1, etc. """ import matplotlib.pyplot as plt import numpy as np # Fixing random state for reproducibility np...
stable__gallery__mplot3d__bars3d
0
figure_000.png
Create 2D bar graphs in different planes — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/mplot3d/bars3d.html#sphx-glr-download-gallery-mplot3d-bars3d-py
https://matplotlib.org/stable/_downloads/5b023f7fea1b0a1fc6abfea4090951a1/bars3d.py
bars3d.py
mplot3d
ok
1
null
""" =================== 3D box surface plot =================== Given data on a gridded volume ``X``, ``Y``, ``Z``, this example plots the data values on the volume surfaces. The strategy is to select the data from each surface and plot contours separately using `.axes3d.Axes3D.contourf` with appropriate parameters *...
stable__gallery__mplot3d__box3d
0
figure_000.png
3D box surface plot — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/mplot3d/box3d.html#sphx-glr-download-gallery-mplot3d-box3d-py
https://matplotlib.org/stable/_downloads/2f55e7d3c6f1f46dcc05e217087e84df/box3d.py
box3d.py
mplot3d
ok
1
null
""" ================================= Plot contour (level) curves in 3D ================================= This is like a contour plot in 2D except that the ``f(x, y)=c`` curve is plotted on the plane ``z=c``. """ import matplotlib.pyplot as plt from matplotlib import cm from mpl_toolkits.mplot3d import axes3d ax = ...
stable__gallery__mplot3d__contour3d
0
figure_000.png
Plot contour (level) curves in 3D — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/mplot3d/contour3d.html#sphx-glr-download-gallery-mplot3d-contour3d-py
https://matplotlib.org/stable/_downloads/6989ade00e7a8f65a6687d825416ba7c/contour3d.py
contour3d.py
mplot3d
ok
1
null
""" =========================================================== Plot contour (level) curves in 3D using the extend3d option =========================================================== This modification of the :doc:`contour3d` example uses ``extend3d=True`` to extend the curves vertically into 'ribbons'. """ import ma...
stable__gallery__mplot3d__contour3d_2
0
figure_000.png
Plot contour (level) curves in 3D using the extend3d option — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/mplot3d/contour3d_2.html#sphx-glr-download-gallery-mplot3d-contour3d-2-py
https://matplotlib.org/stable/_downloads/1531a5c0cde762fac88bcce62a5bdefc/contour3d_2.py
contour3d_2.py
mplot3d
ok
1
null
""" ===================================== Project contour profiles onto a graph ===================================== Demonstrates displaying a 3D surface while also projecting contour 'profiles' onto the 'walls' of the graph. See :doc:`contourf3d_2` for the filled version. """ import matplotlib.pyplot as plt from mp...
stable__gallery__mplot3d__contour3d_3
0
figure_000.png
Project contour profiles onto a graph — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/mplot3d/contour3d_3.html#sphx-glr-download-gallery-mplot3d-contour3d-3-py
https://matplotlib.org/stable/_downloads/b38e7e6affb8627f98fe832e54458e99/contour3d_3.py
contour3d_3.py
mplot3d
ok
1
null
""" =============== Filled contours =============== `.Axes3D.contourf` differs from `.Axes3D.contour` in that it creates filled contours, i.e. a discrete number of colours are used to shade the domain. This is like a `.Axes.contourf` plot in 2D except that the shaded region corresponding to the level c is graphed on ...
stable__gallery__mplot3d__contourf3d
0
figure_000.png
Filled contours — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/mplot3d/contourf3d.html#sphx-glr-download-gallery-mplot3d-contourf3d-py
https://matplotlib.org/stable/_downloads/d441affd37b47c7dcc7eb8b36352778e/contourf3d.py
contourf3d.py
mplot3d
ok
1
null
""" =================================== Project filled contour onto a graph =================================== Demonstrates displaying a 3D surface while also projecting filled contour 'profiles' onto the 'walls' of the graph. See :doc:`contour3d_3` for the unfilled version. """ import matplotlib.pyplot as plt from ...
stable__gallery__mplot3d__contourf3d_2
0
figure_000.png
Project filled contour onto a graph — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/mplot3d/contourf3d_2.html#sphx-glr-download-gallery-mplot3d-contourf3d-2-py
https://matplotlib.org/stable/_downloads/397c15d5008710bca03d5708217557c0/contourf3d_2.py
contourf3d_2.py
mplot3d
ok
1
null
""" ======================================= Custom hillshading in a 3D surface plot ======================================= Demonstrates using custom hillshading in a 3D surface plot. """ import matplotlib.pyplot as plt import numpy as np from matplotlib import cbook, cm from matplotlib.colors import LightSource # ...
stable__gallery__mplot3d__custom_shaded_3d_surface
0
figure_000.png
Custom hillshading in a 3D surface plot — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/mplot3d/custom_shaded_3d_surface.html#sphx-glr-download-gallery-mplot3d-custom-shaded-3d-surface-py
https://matplotlib.org/stable/_downloads/3b9ac21ecf6a0b30550b0fb236dcec5a/custom_shaded_3d_surface.py
custom_shaded_3d_surface.py
mplot3d
ok
1
null
""" ============ 3D errorbars ============ An example of using errorbars with upper and lower limits in mplot3d. """ import matplotlib.pyplot as plt import numpy as np ax = plt.figure().add_subplot(projection='3d') # setting up a parametric curve t = np.arange(0, 2*np.pi+.1, 0.01) x, y, z = np.sin(t), np.cos(3*t), ...
stable__gallery__mplot3d__errorbar3d
0
figure_000.png
3D errorbars — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/mplot3d/errorbar3d.html#sphx-glr-download-gallery-mplot3d-errorbar3d-py
https://matplotlib.org/stable/_downloads/7393bf5548239a03c1f437616d7da22e/errorbar3d.py
errorbar3d.py
mplot3d
ok
1
null
""" ===================== Fill between 3D lines ===================== Demonstrate how to fill the space between 3D lines with surfaces. Here we create a sort of "lampshade" shape. """ import matplotlib.pyplot as plt import numpy as np N = 50 theta = np.linspace(0, 2*np.pi, N) x1 = np.cos(theta) y1 = np.sin(theta) z...
stable__gallery__mplot3d__fillbetween3d
0
figure_000.png
Fill between 3D lines — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/mplot3d/fillbetween3d.html#sphx-glr-download-gallery-mplot3d-fillbetween3d-py
https://matplotlib.org/stable/_downloads/95d823ebdf4a1590b38e6c3ba1874be8/fillbetween3d.py
fillbetween3d.py
mplot3d
ok
1
null
""" ========================= Fill under 3D line graphs ========================= Demonstrate how to create polygons which fill the space under a line graph. In this example polygons are semi-transparent, creating a sort of 'jagged stained glass' effect. """ import math import matplotlib.pyplot as plt import numpy a...
stable__gallery__mplot3d__fillunder3d
0
figure_000.png
Fill under 3D line graphs — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/mplot3d/fillunder3d.html#sphx-glr-download-gallery-mplot3d-fillunder3d-py
https://matplotlib.org/stable/_downloads/76b7ceeb0e946ed74946217ca457ef89/fillunder3d.py
fillunder3d.py
mplot3d
ok
1
null
""" ============================== Create 3D histogram of 2D data ============================== Demo of a histogram for 2D data as a bar graph in 3D. """ import matplotlib.pyplot as plt import numpy as np # Fixing random state for reproducibility np.random.seed(19680801) fig = plt.figure() ax = fig.add_subplot(pr...
stable__gallery__mplot3d__hist3d
0
figure_000.png
Create 3D histogram of 2D data — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/mplot3d/hist3d.html#sphx-glr-download-gallery-mplot3d-hist3d-py
https://matplotlib.org/stable/_downloads/1c178669fa7845fc12cb2b519ae951fd/hist3d.py
hist3d.py
mplot3d
ok
1
null
""" =============== 2D images in 3D =============== This example demonstrates how to plot 2D color coded images (similar to `.Axes.imshow`) as a plane in 3D. Matplotlib does not have a native function for this. Below we build one by relying on `.Axes3D.plot_surface`. For simplicity, there are some differences to `.Ax...
stable__gallery__mplot3d__imshow3d
0
figure_000.png
2D images in 3D — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/mplot3d/imshow3d.html#sphx-glr-download-gallery-mplot3d-imshow3d-py
https://matplotlib.org/stable/_downloads/85c98843408756006b0ab8798a3b9590/imshow3d.py
imshow3d.py
mplot3d
ok
1
null
""" =================== Intersecting planes =================== This examples demonstrates drawing intersecting planes in 3D. It is a generalization of :doc:`/gallery/mplot3d/imshow3d`. Drawing intersecting planes in `.mplot3d` is complicated, because `.mplot3d` is not a real 3D renderer, but only projects the Artist...
stable__gallery__mplot3d__intersecting_planes
0
figure_000.png
Intersecting planes — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/mplot3d/intersecting_planes.html#sphx-glr-download-gallery-mplot3d-intersecting-planes-py
https://matplotlib.org/stable/_downloads/68e888ee31fb17abb06115e5c35bf104/intersecting_planes.py
intersecting_planes.py
mplot3d
ok
1
null
""" ================ Parametric curve ================ This example demonstrates plotting a parametric curve in 3D. """ import matplotlib.pyplot as plt import numpy as np ax = plt.figure().add_subplot(projection='3d') # Prepare arrays x, y, z theta = np.linspace(-4 * np.pi, 4 * np.pi, 100) z = np.linspace(-2, 2, 10...
stable__gallery__mplot3d__lines3d
0
figure_000.png
Parametric curve — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/mplot3d/lines3d.html#sphx-glr-download-gallery-mplot3d-lines3d-py
https://matplotlib.org/stable/_downloads/7ae7882b92eea4ad03cff7c603d2a6dd/lines3d.py
lines3d.py
mplot3d
ok
1
null
""" ================ Lorenz attractor ================ This is an example of plotting Edward Lorenz's 1963 `"Deterministic Nonperiodic Flow"`_ in a 3-dimensional space using mplot3d. .. _"Deterministic Nonperiodic Flow": https://journals.ametsoc.org/view/journals/atsc/20/2/1520-0469_1963_020_0130_dnf_2_0_co_2.xml ...
stable__gallery__mplot3d__lorenz_attractor
0
figure_000.png
Lorenz attractor — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/mplot3d/lorenz_attractor.html#sphx-glr-download-gallery-mplot3d-lorenz-attractor-py
https://matplotlib.org/stable/_downloads/7bcb50501dff2222c41e6dd71664c10f/lorenz_attractor.py
lorenz_attractor.py
mplot3d
ok
1
null
""" ============================= 2D and 3D Axes in same figure ============================= This example shows a how to plot a 2D and a 3D plot on the same figure. """ import matplotlib.pyplot as plt import numpy as np def f(t): return np.cos(2*np.pi*t) * np.exp(-t) # Set up a figure twice as tall as it is ...
stable__gallery__mplot3d__mixed_subplots
0
figure_000.png
2D and 3D Axes in same figure — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/mplot3d/mixed_subplots.html#sphx-glr-download-gallery-mplot3d-mixed-subplots-py
https://matplotlib.org/stable/_downloads/d97169a8850133651928362d22fa2ffb/mixed_subplots.py
mixed_subplots.py
mplot3d
ok
1
null
""" ========================= Automatic text offsetting ========================= This example demonstrates mplot3d's offset text display. As one rotates the 3D figure, the offsets should remain oriented the same way as the axis label, and should also be located "away" from the center of the plot. This demo triggers ...
stable__gallery__mplot3d__offset
0
figure_000.png
Automatic text offsetting — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/mplot3d/offset.html#sphx-glr-download-gallery-mplot3d-offset-py
https://matplotlib.org/stable/_downloads/83a4da0793b08ae8f45786e3c9b4e373/offset.py
offset.py
mplot3d
ok
1
null
""" ============================ Draw flat objects in 3D plot ============================ Demonstrate using `.pathpatch_2d_to_3d` to 'draw' shapes and text on a 3D plot. """ import matplotlib.pyplot as plt import numpy as np from matplotlib.patches import Circle, PathPatch from matplotlib.text import TextPath from ...
stable__gallery__mplot3d__pathpatch3d
0
figure_000.png
Draw flat objects in 3D plot — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/mplot3d/pathpatch3d.html#sphx-glr-download-gallery-mplot3d-pathpatch3d-py
https://matplotlib.org/stable/_downloads/ab0fba45e231f940e29a0a3aacac8776/pathpatch3d.py
pathpatch3d.py
mplot3d
ok
1
null
""" ==================== Generate 3D polygons ==================== Demonstrate how to create polygons in 3D. Here we stack 3 hexagons. """ import matplotlib.pyplot as plt import numpy as np from mpl_toolkits.mplot3d.art3d import Poly3DCollection # Coordinates of a hexagon angles = np.linspace(0, 2 * np.pi, 6, endpo...
stable__gallery__mplot3d__polys3d
0
figure_000.png
Generate 3D polygons — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/mplot3d/polys3d.html#sphx-glr-download-gallery-mplot3d-polys3d-py
https://matplotlib.org/stable/_downloads/54fadf20e54a727a7a5d9dd83e7a9e3b/polys3d.py
polys3d.py
mplot3d
ok
1
null
""" ======================== 3D plot projection types ======================== Demonstrates the different camera projections for 3D plots, and the effects of changing the focal length for a perspective projection. Note that Matplotlib corrects for the 'zoom' effect of changing the focal length. The default focal leng...
stable__gallery__mplot3d__projections
0
figure_000.png
3D plot projection types — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/mplot3d/projections.html#sphx-glr-download-gallery-mplot3d-projections-py
https://matplotlib.org/stable/_downloads/9b22f16328066c6a0d023743cb5c6241/projections.py
projections.py
mplot3d
ok
1
null
""" ============== 3D quiver plot ============== Demonstrates plotting directional arrows at points on a 3D meshgrid. """ import matplotlib.pyplot as plt import numpy as np ax = plt.figure().add_subplot(projection='3d') # Make the grid x, y, z = np.meshgrid(np.arange(-0.8, 1, 0.2), np.arange(-...
stable__gallery__mplot3d__quiver3d
0
figure_000.png
3D quiver plot — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/mplot3d/quiver3d.html#sphx-glr-download-gallery-mplot3d-quiver3d-py
https://matplotlib.org/stable/_downloads/19a0072d80eefa5dc179a38243c1da91/quiver3d.py
quiver3d.py
mplot3d
ok
1
null
""" ============== 3D scatterplot ============== Demonstration of a basic scatterplot in 3D. """ import matplotlib.pyplot as plt import numpy as np # Fixing random state for reproducibility np.random.seed(19680801) def randrange(n, vmin, vmax): """ Helper function to make an array of random numbers having ...
stable__gallery__mplot3d__scatter3d
0
figure_000.png
3D scatterplot — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/mplot3d/scatter3d.html#sphx-glr-download-gallery-mplot3d-scatter3d-py
https://matplotlib.org/stable/_downloads/faa507e7c87c72109d38e6eaffdc42e0/scatter3d.py
scatter3d.py
mplot3d
ok
1
null
""" ======= 3D stem ======= Demonstration of a stem plot in 3D, which plots vertical lines from a baseline to the *z*-coordinate and places a marker at the tip. """ import matplotlib.pyplot as plt import numpy as np theta = np.linspace(0, 2*np.pi) x = np.cos(theta - np.pi/2) y = np.sin(theta - np.pi/2) z = theta fi...
stable__gallery__mplot3d__stem3d_demo
0
figure_000.png
3D stem — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/mplot3d/stem3d_demo.html#sphx-glr-download-gallery-mplot3d-stem3d-demo-py
https://matplotlib.org/stable/_downloads/c0fc774cc7f31ac97da140bcecf8167e/stem3d_demo.py
stem3d_demo.py
mplot3d
ok
3
null
""" ==================== 3D plots as subplots ==================== Demonstrate including 3D plots as subplots. """ import matplotlib.pyplot as plt import numpy as np from matplotlib import cm from mpl_toolkits.mplot3d.axes3d import get_test_data # set up a figure twice as wide as it is tall fig = plt.figure(figsize...
stable__gallery__mplot3d__subplot3d
0
figure_000.png
3D plots as subplots — Matplotlib 3.10.8 documentation
https://matplotlib.org/stable/gallery/mplot3d/subplot3d.html#sphx-glr-download-gallery-mplot3d-subplot3d-py
https://matplotlib.org/stable/_downloads/c4f54a042d9a81d3afae26490415434f/subplot3d.py
subplot3d.py
mplot3d
ok
1
null