https://matplotlib.org/stable/plot_types/index.html

Plot types Overview of many common plotting commands provided by Matplotlib.

See the gallery for more examples and the tutorials page for longer examples.

Pairwise data Plots of pairwise , tabular , and functional

data.

plot(x, y)

scatter(x, y)

bar(x, height)

stem(x, y)

fill_between(x, y1, y2)

stackplot(x, y)

stairs(values) Statistical distributions Plots of the distribution of at least one variable in a dataset. Some of these methods also compute the distributions.

hist(x)

boxplot(X)

errorbar(x, y, yerr, xerr)

violinplot(D)

eventplot(D)

hist2d(x, y)

hexbin(x, y, C)

pie(x)

ecdf(x) Gridded data Plots of arrays and images

and fields on regular grids and corresponding coordinate grids

.

imshow(Z)

pcolormesh(X, Y, Z)

contour(X, Y, Z)

contourf(X, Y, Z)

barbs(X, Y, U, V)

quiver(X, Y, U, V)

streamplot(X, Y, U, V) Irregularly gridded data Plots of data

on unstructured grids , unstructured coordinate grids

, and 2D functions .

tricontour(x, y, z)

tricontourf(x, y, z)

tripcolor(x, y, z)

triplot(x, y) 3D and volumetric data Plots of three-dimensional , surface , and volumetric

data using the mpl_toolkits.mplot3d library.

bar3d(x, y, z, dx, dy, dz)

fill_between(x1, y1, z1, x2, y2, z2)

plot(xs, ys, zs)

quiver(X, Y, Z, U, V, W)

scatter(xs, ys, zs)

stem(x, y, z)

plot_surface(X, Y, Z)

plot_trisurf(x, y, z)

voxels([x, y, z], filled)

plot_wireframe(X, Y, Z) Download all examples in Python source code: plot_types_python.zip

Download all examples in Jupyter notebooks: plot_types_jupyter.zip

Gallery generated by Sphinx-Gallery

On this page

Pairwise data Statistical distributions Gridded data Irregularly gridded data 3D and volumetric data