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 \((x, y)\), tabular \((var\_0, \cdots, var\_n)\), and functional \(f(x)=y\) data.

BERJAYA

plot(x, y)

plot(x, y)
BERJAYA

scatter(x, y)

scatter(x, y)
BERJAYA

bar(x, height)

bar(x, height)
BERJAYA

stem(x, y)

stem(x, y)
BERJAYA

fill_between(x, y1, y2)

fill_between(x, y1, y2)
BERJAYA

stackplot(x, y)

stackplot(x, y)
BERJAYA

stairs(values)

stairs(values)

Statistical distributions#

Plots of the distribution of at least one variable in a dataset. Some of these methods also compute the distributions.

BERJAYA

hist(x)

hist(x)
BERJAYA

boxplot(X)

boxplot(X)
BERJAYA

errorbar(x, y, yerr, xerr)

errorbar(x, y, yerr, xerr)
BERJAYA

violinplot(D)

violinplot(D)
BERJAYA

eventplot(D)

eventplot(D)
BERJAYA

hist2d(x, y)

hist2d(x, y)
BERJAYA

hexbin(x, y, C)

hexbin(x, y, C)
BERJAYA

pie(x)

pie(x)
BERJAYA

ecdf(x)

ecdf(x)

Gridded data#

Plots of arrays and images \(Z_{i, j}\) and fields \(U_{i, j}, V_{i, j}\) on regular grids and corresponding coordinate grids \(X_{i,j}, Y_{i,j}\).

BERJAYA

imshow(Z)

imshow(Z)
BERJAYA

pcolormesh(X, Y, Z)

pcolormesh(X, Y, Z)
BERJAYA

contour(X, Y, Z)

contour(X, Y, Z)
BERJAYA

contourf(X, Y, Z)

contourf(X, Y, Z)
BERJAYA

barbs(X, Y, U, V)

barbs(X, Y, U, V)
BERJAYA

quiver(X, Y, U, V)

quiver(X, Y, U, V)
BERJAYA

streamplot(X, Y, U, V)

streamplot(X, Y, U, V)

Irregularly gridded data#

Plots of data \(Z_{x, y}\) on unstructured grids , unstructured coordinate grids \((x, y)\), and 2D functions \(f(x, y) = z\).

BERJAYA

tricontour(x, y, z)

tricontour(x, y, z)
BERJAYA

tricontourf(x, y, z)

tricontourf(x, y, z)
BERJAYA

tripcolor(x, y, z)

tripcolor(x, y, z)
BERJAYA

triplot(x, y)

triplot(x, y)

3D and volumetric data#

Plots of three-dimensional \((x,y,z)\), surface \(f(x,y)=z\), and volumetric \(V_{x, y, z}\) data using the mpl_toolkits.mplot3d library.

BERJAYA

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

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

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

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

plot(xs, ys, zs)

plot(xs, ys, zs)
BERJAYA

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

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

scatter(xs, ys, zs)

scatter(xs, ys, zs)
BERJAYA

stem(x, y, z)

stem(x, y, z)
BERJAYA

plot_surface(X, Y, Z)

plot_surface(X, Y, Z)
BERJAYA

plot_trisurf(x, y, z)

plot_trisurf(x, y, z)
BERJAYA

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

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

plot_wireframe(X, Y, Z)

plot_wireframe(X, Y, Z)

Gallery generated by Sphinx-Gallery