[ Web Proxy ]
URL:
Viewing: https://matplotlib.org/stable/api/_as_gen/../../gallery/misc/../index.html [Back]  [Original]

Examples — Matplotlib 3.11.2 documentation
Back to top
Search the docs ...:

Examples#

For an overview of the plotting methods we provide, see Plot types

This page contains example plots. Click on any image to see the full image and source code.

For longer tutorials, see our tutorials page. You can also find external resources and a FAQ in our user guide.

Tagging!

You can also browse the example gallery by tags.

Lines, bars and markers#

[]

Line plot

Line plot
[]

Linestyles

Linestyles
[]

Dashed line style configuration

Dashed line style configuration
[]

Markevery Demo

Markevery Demo
[]

JoinStyle

JoinStyle
[]

CapStyle

CapStyle
[]

Marker reference

Marker reference
[]

Infinite lines

Infinite lines
[]

Multicolored lines

Multicolored lines
[]

Lines with a ticked patheffect

Lines with a ticked patheffect
[]

Grouped bar chart with labels

Grouped bar chart with labels
[]

Bar chart with labels

Bar chart with labels
[]

Stacked bar chart

Stacked bar chart
[]

Bar chart with individual bar colors

Bar chart with individual bar colors
[]

Hat graph

Hat graph
[]

Bar chart with gradients

Bar chart with gradients
[]

Horizontal bar chart

Horizontal bar chart
[]

Discrete distribution as horizontal bar chart

Discrete distribution as horizontal bar chart
[]

Broken horizontal bars

Broken horizontal bars
[]

Scatter Demo2

Scatter Demo2
[]

Mapping marker properties to multivariate data

Mapping marker properties to multivariate data
[]

Marker examples

Marker examples
[]

Scatter plot with a legend

Scatter plot with a legend
[]

Scatter plot with masked values

Scatter plot with masked values
[]

Scatter plot with histograms

Scatter plot with histograms
[]

Stairs Demo

Stairs Demo
[]

Step Demo

Step Demo
[]

Filled polygon

Filled polygon
[]

fill_between with transparency

fill_between with transparency
[]

Fill the area between two lines

Fill the area between two lines
[]

Fill the area between two vertical lines

Fill the area between two vertical lines
[]

Stackplots and streamgraphs

Stackplots and streamgraphs
[]

EventCollection Demo

EventCollection Demo
[]

Eventplot demo

Eventplot demo
[]

Timeline with lines, dates, and text

Timeline with lines, dates, and text
[]

hlines and vlines

hlines and vlines
[]

Shade regions defined by a logical mask using fill_between

Shade regions defined by a logical mask using fill_between
[]

Stem plot

Stem plot
[]

Plotting categorical variables

Plotting categorical variables
[]

Plotting masked and NaN values

Plotting masked and NaN values
[]

Spectrum representations

Spectrum representations

Images, contours and fields#

[]

Many ways to plot images

Many ways to plot images
[]

Image with masked values

Image with masked values
[]

Multiple images with one colorbar

Multiple images with one colorbar
[]

Modifying the coordinate formatter

Modifying the coordinate formatter
[]

Image resampling

Image resampling
[]

Interpolations for imshow

Interpolations for imshow
[]

Layer images with alpha blending

Layer images with alpha blending
[]

Blend transparency with color in 2D images

Blend transparency with color in 2D images
[]

Shading example

Shading example
[]

Clipping images with patches

Clipping images with patches
[]

Placing images, preserving relative sizes

Placing images, preserving relative sizes
[]

pcolor images

pcolor images
[]

pcolormesh

pcolormesh
[]

pcolormesh grids and shading

pcolormesh grids and shading
[]

Image nonuniform

Image nonuniform
[]

QuadMesh Demo

QuadMesh Demo
[]

Triplot Demo

Triplot Demo
[]

Tripcolor Demo

Tripcolor Demo
[]

Tricontour Demo

Tricontour Demo
[]

Tricontour Smooth User

Tricontour Smooth User
[]

Tricontour Smooth Delaunay

Tricontour Smooth Delaunay
[]

Trigradient Demo

Trigradient Demo
[]

Triinterp Demo

Triinterp Demo
[]

Contour plot of irregularly spaced data

Contour plot of irregularly spaced data
[]

Contour Demo

Contour Demo
[]

Contour Label Demo

Contour Label Demo
[]

Contourf demo

Contourf demo
[]

Contour image

Contour image
[]

Contourf and log color scale

Contourf and log color scale
[]

Contourf hatching

Contourf hatching
[]

Contour corner mask

Contour corner mask
[]

Contouring the solution space of optimizations

Contouring the solution space of optimizations
[]

Quiver Simple Demo

Quiver Simple Demo
[]

Advanced quiver and quiverkey functions

Advanced quiver and quiverkey functions
[]

Wind barbs

Wind barbs
[]

Streamplot

Streamplot
[]

Interactive adjustment of colormap range

Interactive adjustment of colormap range
[]

Colormap normalizations

Colormap normalizations
[]

Colormap normalizations SymLogNorm

Colormap normalizations SymLogNorm
[]

Annotated heatmap

Annotated heatmap
[]

Affine transform of an image

Affine transform of an image
[]

Visualize matrices with matshow

Visualize matrices with matshow
[]

Spy Demos

Spy Demos
[]

Spectrogram

Spectrogram
[]

Barcode

Barcode
[]

BboxImage Demo

BboxImage Demo
[]

Figimage Demo

Figimage Demo
[]

Watermark image

Watermark image

Statistics#

[]

Errorbar function

Errorbar function
[]

Different ways of specifying error bars

Different ways of specifying error bars
[]

Errorbar subsampling

Errorbar subsampling
[]

Errorbar limit selection

Errorbar limit selection
[]

Including upper and lower limits in error bars

Including upper and lower limits in error bars
[]

Create boxes from error bars using PatchCollection

Create boxes from error bars using PatchCollection
[]

Plot a confidence ellipse of a two-dimensional dataset

Plot a confidence ellipse of a two-dimensional dataset
[]

Curve with error band

Curve with error band
[]

Histograms

Histograms
[]

Demo of the histogram function's different histtype settings

Demo of the histogram function's different histtype settings
[]

Histogram bins, density, and weight

Histogram bins, density, and weight
[]

The histogram (hist) function with multiple data sets

The histogram (hist) function with multiple data sets
[]

Multiple histograms side by side

Multiple histograms side by side
[]

Bihistogram

Bihistogram
[]

Cumulative distributions

Cumulative distributions
[]

Hexagonal binned plot

Hexagonal binned plot
[]

Time Series Histogram

Time Series Histogram
[]

Boxplots

Boxplots
[]

Artist customization in box plots

Artist customization in box plots
[]

Box plots with custom fill colors

Box plots with custom fill colors
[]

Separate calculation and plotting of boxplots

Separate calculation and plotting of boxplots
[]

Box plot vs. violin plot comparison

Box plot vs. violin plot comparison
[]

Violin plot basics

Violin plot basics
[]

Violin plot customization

Violin plot customization
[]

Cross- and auto-correlation

Cross- and auto-correlation
[]

Power spectral density (PSD)

Power spectral density (PSD)
[]

Cross spectral density (CSD)

Cross spectral density (CSD)
[]

Plotting the coherence of two signals

Plotting the coherence of two signals

Pie and polar charts#

[]

Pie charts

Pie charts
[]

Bar of pie

Bar of pie
[]

Nested pie charts

Nested pie charts
[]

A pie and a donut with labels

A pie and a donut with labels
[]

Labeling pie charts

Labeling pie charts
[]

Bar chart on polar axis

Bar chart on polar axis
[]

Polar plot

Polar plot
[]

Error bar rendering on polar axis

Error bar rendering on polar axis
[]

Polar legend

Polar legend
[]

Scatter plot on polar axis

Scatter plot on polar axis

Subplots, axes and figures#

[]

Multiple subplots

Multiple subplots
[]

Create multiple subplots using plt.subplots

Create multiple subplots using plt.subplots
[]

Axes Demo

Axes Demo
[]

GridSpec with variable sizes and spacing

GridSpec with variable sizes and spacing
[]

Gridspec for multi-column/row subplot layouts

Gridspec for multi-column/row subplot layouts
[]

Nested Gridspecs

Nested Gridspecs
[]

Combine two subplots using subplots and GridSpec

Combine two subplots using subplots and GridSpec
[]

subplot2grid

subplot2grid
[]

Resize Axes with constrained layout

Resize Axes with constrained layout
[]

Resize Axes with tight layout

Resize Axes with tight layout
[]

Subplots spacings and margins

Subplots spacings and margins
[]

Programmatically control subplot adjustment

Programmatically control subplot adjustment
[]

Adjacent subplots

Adjacent subplots
[]

Controlling view limits using margins and sticky_edges

Controlling view limits using margins and sticky_edges
[]

Axes box aspect

Axes box aspect
[]

Equal axis aspect ratio

Equal axis aspect ratio
[]

Manage multiple figures in pyplot

Manage multiple figures in pyplot
[]

Figure size in different units

Figure size in different units
[]

Figure subfigures

Figure subfigures
[]

Custom Figure subclasses

Custom Figure subclasses
[]

Shared axis

Shared axis
[]

Inverted axis

Inverted axis
[]

Plots with different scales

Plots with different scales
[]

Different scales on the same Axes

Different scales on the same Axes
[]

Multiple y-axis with Spines

Multiple y-axis with Spines
[]

Twin Axes with delta_zorder

Twin Axes with delta_zorder
[]

Secondary Axis

Secondary Axis
[]

Align labels and titles

Align labels and titles
[]

Axis label position

Axis label position
[]

Axes properties

Axes properties
[]

Figure labels: suptitle, supxlabel, supylabel

Figure labels: suptitle, supxlabel, supylabel
[]

Axes zoom effect

Axes zoom effect
[]

Zoom region inset Axes

Zoom region inset Axes
[]

Broken axis

Broken axis
[]

Geographic Projections

Geographic Projections
[]

Draw regions that span an Axes

Draw regions that span an Axes

Ticks#

[]

Automatically setting tick positions

Automatically setting tick positions
[]

Tick locators

Tick locators
[]

Major and minor ticks

Major and minor ticks
[]

Align tick labels

Align tick labels
[]

Move x/y-axis ticks and labels on top and right

Move x/y-axis ticks and labels on top and right
[]

Center labels between ticks

Center labels between ticks
[]

Rotated tick labels

Rotated tick labels
[]

Multilevel (nested) ticks

Multilevel (nested) ticks
[]

The default tick formatter

The default tick formatter
[]

Tick formatters

Tick formatters
[]

Custom Ticker

Custom Ticker
[]

Dollar ticks

Dollar ticks
[]

Format ticks using engineering notation

Format ticks using engineering notation
[]

SI prefixed offsets and natural order of magnitudes

SI prefixed offsets and natural order of magnitudes
[]

Setting tick labels from a list of values

Setting tick labels from a list of values
[]

Date tick labels

Date tick labels
[]

Date tick locators and formatters

Date tick locators and formatters
[]

Format date ticks using ConciseDateFormatter

Format date ticks using ConciseDateFormatter
[]

Date converter demo

Date converter demo
[]

Placing date ticks using recurrence rules

Placing date ticks using recurrence rules
[]

Custom tick formatter for time series

Custom tick formatter for time series
[]

Date precision and epochs

Date precision and epochs
[]

Colorbar Tick labelling

Colorbar Tick labelling
[]

Customizing figure and axes appearance

Customizing figure and axes appearance
[]

Fixing too many ticks

Fixing too many ticks

Scales#

These examples cover how different scales are handled in Matplotlib.

[]

Scales overview

Scales overview
[]

Asinh scale

Asinh scale
[]

Loglog aspect

Loglog aspect
[]

Custom scale

Custom scale
[]

Log scale

Log scale
[]

Logit scale

Logit scale
[]

Exploring normalizations

Exploring normalizations
[]

Symlog scale

Symlog scale

Spines#

[]

Spines

Spines
[]

Spine placement

Spine placement
[]

Dropped spines

Dropped spines
[]

Centered spines with arrows

Centered spines with arrows

Text, labels and annotations#

[]

Text properties

Text properties
[]

Controlling style of text and labels using a dictionary

Controlling style of text and labels using a dictionary
[]

Text alignment

Text alignment
[]

Multiline text

Multiline text
[]

Auto-wrap text

Auto-wrap text
[]

Text rotation mode

Text rotation mode
[]

Text rotation angle in data coordinates

Text rotation angle in data coordinates
[]

Concatenate text objects with different properties

Concatenate text objects with different properties
[]

Using a text as a Path

Using a text as a Path
[]

Annotating a plot

Annotating a plot
[]

Annotate plots

Annotate plots
[]

Annotate polar plots

Annotate polar plots
[]

Angle annotations on bracket arrows

Angle annotations on bracket arrows
[]

Annotation arrow style reference

Annotation arrow style reference
[]

Styling text boxes

Styling text boxes
[]

Placing text boxes

Placing text boxes
[]

Labelling subplots

Labelling subplots
[]

Artists as annotations

Artists as annotations
[]

Arrow Demo

Arrow Demo
[]

Scale invariant angle label

Scale invariant angle label
[]

Legend Demo

Legend Demo
[]

Legend using pre-defined labels

Legend using pre-defined labels
[]

Compose custom legends

Compose custom legends
[]

Figure legend demo

Figure legend demo
[]

Accented text

Accented text
[]

The difference between \dfrac and \frac

The difference between \dfrac and \frac
[]

Configure the font family

Configure the font family
[]

Using ttf font files

Using ttf font files
[]

Font table

Font table
[]

Fonts demo (object-oriented style)

Fonts demo (object-oriented style)
[]

Fonts demo (keyword arguments)

Fonts demo (keyword arguments)
[]

Convert texts to images

Convert texts to images
[]

Mathtext

Mathtext
[]

Mathematical expressions

Mathematical expressions
[]

Math fontfamily

Math fontfamily
[]

STIX Fonts

STIX Fonts
[]

Render math equations using TeX

Render math equations using TeX
[]

Unicode minus

Unicode minus
[]

Usetex text baseline

Usetex text baseline
[]

Usetex font effects

Usetex font effects
[]

Artist within an artist

Artist within an artist
[]

Title positioning

Title positioning
[]

Text watermark

Text watermark

Shapes and collections#

[]

Arrow guide

Arrow guide
[]

Reference for Matplotlib artists

Reference for Matplotlib artists
[]

Line, Poly and RegularPoly Collection

Line, Poly and RegularPoly Collection
[]

Compound path

Compound path
[]

Dolphins

Dolphins
[]

Mmh Donuts!!!

Mmh Donuts!!!
[]

Ellipse with orientation arrow demo

Ellipse with orientation arrow demo
[]

Ellipse Collection

Ellipse Collection
[]

Ellipse Demo

Ellipse Demo
[]

Drawing fancy boxes

Drawing fancy boxes
[]

Hatch demo

Hatch demo
[]

Hatch style reference

Hatch style reference
[]

Hatchcolor Demo

Hatchcolor Demo
[]

Plot multiple lines using a LineCollection

Plot multiple lines using a LineCollection
[]

Circles, Wedges and Polygons

Circles, Wedges and Polygons
[]

PathPatch object

PathPatch object
[]

Bezier curve

Bezier curve
[]

Scatter plot

Scatter plot

Color#

For a description of the colormaps available in Matplotlib, see the colormaps tutorial.

[]

Color Demo

Color Demo
[]

Color by y-value

Color by y-value
[]

Colors in the default property cycle

Colors in the default property cycle
[]

Named color sequences

Named color sequences
[]

Colorbar

Colorbar
[]

Histogram as colorbar

Histogram as colorbar
[]

Colormap reference

Colormap reference
[]

Create a colormap from a list of colors

Create a colormap from a list of colors
[]

Selecting individual colors from a colormap

Selecting individual colors from a colormap
[]

List of named colors

List of named colors
[]

Ways to set a color's alpha value

Ways to set a color's alpha value

Style sheets#

[]

Bayesian Methods for Hackers style sheet

Bayesian Methods for Hackers style sheet
[]

Dark background style sheet

Dark background style sheet
[]

FiveThirtyEight style sheet

FiveThirtyEight style sheet
[]

ggplot style sheet

ggplot style sheet
[]

Grayscale style sheet

Grayscale style sheet
[]

Petroff style sheets

Petroff style sheets
[]

Solarized Light stylesheet

Solarized Light stylesheet
[]

Style sheets reference

Style sheets reference

Module - pyplot#

[]

Basic plot

Basic plot
[]

Two subplots using pyplot

Two subplots using pyplot

3D plotting#

[]

Plot 2D data on 3D plot

Plot 2D data on 3D plot
[]

Demo of 3D bar charts

Demo of 3D bar charts
[]

Clip the data to the axes view limits

Clip the data to the axes view limits
[]

Create 2D bar graphs in different planes

Create 2D bar graphs in different planes
[]

3D box surface plot

3D box surface plot
[]

Plot contour (level) curves in 3D

Plot contour (level) curves in 3D
[]

Plot contour (level) curves in 3D using the extend3d option

Plot contour (level) curves in 3D using the extend3d option
[]

Project contour profiles onto a graph

Project contour profiles onto a graph
[]

Filled contours

Filled contours
[]

Project filled contour onto a graph

Project filled contour onto a graph
[]

Custom hillshading in a 3D surface plot

Custom hillshading in a 3D surface plot
[]

3D errorbars

3D errorbars
[]

Fill between 3D lines

Fill between 3D lines
[]

Fill under 3D line graphs

Fill under 3D line graphs
[]

Create 3D histogram of 2D data

Create 3D histogram of 2D data
[]

2D images in 3D

2D images in 3D
[]

Intersecting planes

Intersecting planes
[]

Parametric curve

Parametric curve
[]

Lorenz attractor

Lorenz attractor
[]

2D and 3D Axes in same figure

2D and 3D Axes in same figure
[]

Automatic text offsetting

Automatic text offsetting
[]

Draw flat objects in 3D plot

Draw flat objects in 3D plot
[]

Generate 3D polygons

Generate 3D polygons
[]

3D plot projection types

3D plot projection types
[]

3D quiver plot

3D quiver plot
[]

Rotating a 3D plot

Rotating a 3D plot
[]

Scales on 3D (Log, Symlog, etc.)

Scales on 3D (Log, Symlog, etc.)
[]

3D scatterplot

3D scatterplot
[]

3D stem

3D stem
[]

3D plots as subplots

3D plots as subplots
[]

3D surface (colormap)

3D surface (colormap)
[]

3D surface (solid color)

3D surface (solid color)
[]

3D surface (checkerboard)

3D surface (checkerboard)
[]

3D surface with polar coordinates

3D surface with polar coordinates
[]

Text annotations in 3D

Text annotations in 3D
[]

Triangular 3D contour plot

Triangular 3D contour plot
[]

Triangular 3D filled contour plot

Triangular 3D filled contour plot
[]

Triangular 3D surfaces

Triangular 3D surfaces
[]

More triangular 3D surfaces

More triangular 3D surfaces
[]

Primary 3D view planes

Primary 3D view planes
[]

3D voxel / volumetric plot

3D voxel / volumetric plot
[]

3D voxel plot of the NumPy logo

3D voxel plot of the NumPy logo
[]

3D voxel / volumetric plot with RGB colors

3D voxel / volumetric plot with RGB colors
[]

3D voxel / volumetric plot with cylindrical coordinates

3D voxel / volumetric plot with cylindrical coordinates
[]

3D wireframe plot

3D wireframe plot
[]

Animate a 3D wireframe plot

Animate a 3D wireframe plot
[]

3D wireframe plots in one direction

3D wireframe plots in one direction

Module - axes_grid1#

[]

Anchored Direction Arrow

Anchored Direction Arrow
[]

Axes divider

Axes divider
[]

Demo Axes Grid

Demo Axes Grid
[]

Axes Grid2

Axes Grid2
[]

HBoxDivider and VBoxDivider demo

HBoxDivider and VBoxDivider demo
[]

Show RGB channels using RGBAxes

Show RGB channels using RGBAxes
[]

Colorbar with AxesDivider

Colorbar with AxesDivider
[]

Control the position and size of a colorbar with inset_locator.inset_axes

Control the position and size of a colorbar with inset_locator.inset_axes
[]

Per-row or per-column colorbars

Per-row or per-column colorbars
[]

Axes with a fixed physical size

Axes with a fixed physical size
[]

ImageGrid cells with a fixed aspect ratio

ImageGrid cells with a fixed aspect ratio
[]

Inset locator demo

Inset locator demo
[]

Inset locator demo 2

Inset locator demo 2
[]

Make room for ylabel using axes_grid

Make room for ylabel using axes_grid
[]

Parasite Simple

Parasite Simple
[]

Parasite Simple2

Parasite Simple2
[]

Align histogram to scatter plot using locatable Axes

Align histogram to scatter plot using locatable Axes
[]

Simple Anchored Artists

Simple Anchored Artists
[]

Simple Axes Divider 1

Simple Axes Divider 1
[]

Simple axes divider 3

Simple axes divider 3
[]

Simple ImageGrid

Simple ImageGrid
[]

Simple ImageGrid 2

Simple ImageGrid 2
[]

Simple Axisline4

Simple Axisline4

Module - axisartist#

[]

Axis Direction

Axis Direction
[]

axis_direction demo

axis_direction demo
[]

Axis line styles

Axis line styles
[]

Curvilinear grid demo

Curvilinear grid demo
[]

Demo CurveLinear Grid2

Demo CurveLinear Grid2
[]

floating_axes features

floating_axes features
[]

floating_axis demo

floating_axis demo
[]

Parasite Axes demo

Parasite Axes demo
[]

Parasite axis demo

Parasite axis demo
[]

Ticklabel alignment

Ticklabel alignment
[]

Ticklabel direction

Ticklabel direction
[]

Simple axis direction

Simple axis direction
[]

Simple axis tick label and tick directions

Simple axis tick label and tick directions
[]

Simple axis pad

Simple axis pad
[]

Custom spines with axisartist

Custom spines with axisartist
[]

Simple Axisline

Simple Axisline
[]

Simple Axisline3

Simple Axisline3

Animation#

[]

Basic animated line plot

Basic animated line plot
[]

Decay

Decay
[]

Animated histogram

Animated histogram
[]

pyplot animation

pyplot animation
[]

The Bayes update

The Bayes update
[]

The double pendulum problem

The double pendulum problem
[]

Animated image using a precomputed list of images

Animated image using a precomputed list of images
[]

Frame grabbing

Frame grabbing
[]

Multiple Axes animation

Multiple Axes animation
[]

Pause and resume an animation

Pause and resume an animation
[]

Rain simulation

Rain simulation
[]

Animated 3D random walk

Animated 3D random walk
[]

Animated scatter saved as GIF

Animated scatter saved as GIF
[]

Oscilloscope

Oscilloscope
[]

Matplotlib unchained

Matplotlib unchained

Widgets#

Examples of how to write primitive, but GUI agnostic, widgets in matplotlib

[]

Annotated cursor

Annotated cursor
[]

Buttons

Buttons
[]

Check buttons

Check buttons
[]

Cursor

Cursor
[]

Lasso Selector

Lasso Selector
[]

Menu

Menu
[]

Mouse Cursor

Mouse Cursor
[]

Multicursor

Multicursor
[]

Select indices from a collection using polygon selector

Select indices from a collection using polygon selector
[]

Polygon Selector

Polygon Selector
[]

Radio Buttons

Radio Buttons
[]

Radio Buttons Grid

Radio Buttons Grid
[]

Image scaling using a RangeSlider

Image scaling using a RangeSlider
[]

Rectangle and ellipse selectors

Rectangle and ellipse selectors
[]

Slider

Slider
[]

Snap sliders to discrete values

Snap sliders to discrete values
[]

Span Selector

Span Selector
[]

Textbox

Textbox

Event handling#

Matplotlib supports event handling with a GUI neutral event model, so you can connect to Matplotlib events without knowledge of what user interface Matplotlib will ultimately be plugged in to. This has two advantages: the code you write will be more portable, and Matplotlib events are aware of things like data coordinate space and which axes the event occurs in so you don't have to mess with low level transformation details to go from canvas space to data space. Object picking examples are also included.

[]

Close event

Close event
[]

Mouse move and click events

Mouse move and click events
[]

Cross-hair cursor

Cross-hair cursor
[]

Data browser

Data browser
[]

Figure/Axes enter and leave events

Figure/Axes enter and leave events
[]

Interactive functions

Interactive functions
[]

Scroll event

Scroll event
[]

Keypress event

Keypress event
[]

Lasso Demo

Lasso Demo
[]

Legend picking

Legend picking
[]

Looking glass

Looking glass
[]

Path editor

Path editor
[]

Pick event demo

Pick event demo
[]

Pick event demo 2

Pick event demo 2
[]

Polygon editor

Polygon editor
[]

Pong

Pong
[]

Resampling Data

Resampling Data
[]

Timers

Timers
[]

Trifinder Event Demo

Trifinder Event Demo
[]

Viewlims

Viewlims
[]

Zoom modifies other Axes

Zoom modifies other Axes

Embedding Matplotlib in graphical user interfaces#

You can embed Matplotlib directly into a user interface application by following the embedding_in_SOMEGUI.py examples here. Currently Matplotlib supports PyQt/PySide, PyGObject, Tkinter, and wxPython.

When embedding Matplotlib in a GUI, you must use the Matplotlib API directly rather than the pylab/pyplot procedural interface, so take a look at the examples/api directory for some example code working with the API.

[]

CanvasAgg demo

CanvasAgg demo
[]

Embed in GTK3 with a navigation toolbar

Embed in GTK3 with a navigation toolbar
[]

Embed in GTK3

Embed in GTK3
[]

Embed in GTK4 with a navigation toolbar

Embed in GTK4 with a navigation toolbar
[]

Embed in GTK4

Embed in GTK4
[]

Embed in Qt

Embed in Qt
[]

Embed in Tk

Embed in Tk
[]

Embed in wx #2

Embed in wx #2
[]

Embed in wx #3

Embed in wx #3
[]

Embed in wx #4

Embed in wx #4
[]

Embed in wx #5

Embed in wx #5
[]

Embedding WebAgg

Embedding WebAgg
[]

Fourier Demo WX

Fourier Demo WX
[]

GTK3 spreadsheet

GTK3 spreadsheet
[]

GTK4 spreadsheet

GTK4 spreadsheet
[]

Display mathtext in WX

Display mathtext in WX
[]

Matplotlib with Glade 3

Matplotlib with Glade 3
[]

mplcvd -- an example of figure hook

mplcvd -- an example of figure hook
[]

pyplot with GTK3

pyplot with GTK3
[]

pyplot with GTK4

pyplot with GTK4
[]

SVG Histogram

SVG Histogram
[]

SVG Tooltip

SVG Tooltip
[]

Tool Manager

Tool Manager
[]

Embed in a web application server (Flask)

Embed in a web application server (Flask)
[]

Add a cursor in WX

Add a cursor in WX

Units#

These examples cover the many representations of units in Matplotlib.

[]

Annotation with units

Annotation with units
[]

Artist tests

Artist tests
[]

Bar demo with units

Bar demo with units
[]

Group barchart with units

Group barchart with units
[]

Basic units

Basic units
[]

Ellipse with units

Ellipse with units
[]

Evans test

Evans test
[]

Radian ticks

Radian ticks
[]

Inches and centimeters

Inches and centimeters
[]

Unit handling

Unit handling

Miscellaneous#

[]

Anchored Artists

Anchored Artists
[]

Identify whether artists intersect

Identify whether artists intersect
[]

Manual Contour

Manual Contour
[]

Coords Report

Coords Report
[]

Custom projection

Custom projection
[]

Customize Rc

Customize Rc
[]

AGG filter

AGG filter
[]

Ribbon box

Ribbon box
[]

Add lines directly to a figure

Add lines directly to a figure
[]

Fill spiral

Fill spiral
[]

Findobj Demo

Findobj Demo
[]

Font indexing

Font indexing
[]

Font properties

Font properties
[]

Building histograms using Rectangles and PolyCollections

Building histograms using Rectangles and PolyCollections
[]

Hyperlinks

Hyperlinks
[]

Plotting with keywords

Plotting with keywords
[]

Matplotlib logo

Matplotlib logo
[]

Multipage PDF

Multipage PDF
[]

Multiprocessing

Multiprocessing
[]

Packed-bubble chart

Packed-bubble chart
[]

Patheffect Demo

Patheffect Demo
[]

Print image to stdout

Print image to stdout
[]

Rasterization for vector graphics

Rasterization for vector graphics
[]

Set and get properties

Set and get properties
[]

Apply SVG filter to a line

Apply SVG filter to a line
[]

SVG filter pie

SVG filter pie
[]

Table Demo

Table Demo
[]

TickedStroke patheffect

TickedStroke patheffect
[]

transforms.offset_copy

transforms.offset_copy
[]

Zorder Demo

Zorder Demo

Showcase#

[]

Anatomy of a figure

Anatomy of a figure
[]

Firefox

Firefox
[]

Integral as the area under a curve

Integral as the area under a curve
[]

Shaded & power normalized rendering

Shaded & power normalized rendering
[]

Pan/zoom events of overlapping axes

Pan/zoom events of overlapping axes
[]

Stock prices over 32 years

Stock prices over 32 years
[]

XKCD

XKCD

Specialty plots#

[]

Hillshading

Hillshading
[]

Anscombe's quartet

Anscombe's quartet
[]

Hinton diagrams

Hinton diagrams
[]

Ishikawa Diagram

Ishikawa Diagram
[]

Left ventricle bullseye

Left ventricle bullseye
[]

MRI with EEG

MRI with EEG
[]

Radar chart (aka spider or star chart)

Radar chart (aka spider or star chart)
[]

The Sankey class

The Sankey class
[]

Long chain of connections using Sankey

Long chain of connections using Sankey
[]

Rankine power cycle

Rankine power cycle
[]

SkewT-logP diagram: using transforms and custom projections

SkewT-logP diagram: using transforms and custom projections
[]

Topographic hillshading

Topographic hillshading

Gallery generated by Sphinx-Gallery


Web Proxy Viewer  |  New URL  |  Original Page