Graphics > 2-D and 3-D Plots
136 functions in MATLAB › Graphics > 2-D and 3-D Plots.
Animation
addpoints | Appends points to an animated line. |
animatedline | Creates a line that grows as points are added to it. |
clearpoints | Removes all the points of an animated line. |
comet | Animates a 2-D curve with a moving head and a trailing tail. |
comet3 | Animates a 3-D curve with a moving head and a trailing tail. |
drawnow | Updates the figures and processes pending events right away. |
frame2im | Converts a movie frame into image data and a colormap. |
getframe | Captures the current axes or figure as a movie frame. |
getpoints | Returns the coordinates of the points stored in an animated line. |
im2frame | Converts an image into a movie frame structure. |
movie | Plays a sequence of movie frames in a figure. |
Discrete Data Plots
bar | Draws a bar chart. |
bar3 | Draws a 3-D bar chart. |
bar3h | Draws a 3-D bar chart with horizontal bars. |
barh | Draws a horizontal bar chart. |
pareto | Pareto chart: bars sorted in descending order with a line of the cumulative percentage. |
stem | Plots discrete data as vertical stems ending in markers. |
stem3 | Plots three-dimensional discrete data as stems from the xy-plane. |
Data Distribution Plots
binscatter | Shows the density of scattered points by counting them in rectangular bins. |
boxchart | Draws box plots that summarize the distribution of data. |
bubblechart | Draws a scatter plot whose markers vary in size and color. |
bubblechart3 | Draws a 3-D scatter plot whose markers vary in size and color. |
bubblecloud | Draws a packed cloud of circles whose areas are proportional to the data values. |
bubblelegend | Adds a legend that explains the bubble sizes of a bubble chart. |
bubblelim | Sets the range of data values that the bubble sizes cover. |
bubblesize | Sets the smallest and largest bubble size, in points. |
donutchart | Draws a donut chart, a pie chart with a hole in the middle. |
fewerbins | Reduces the number of bins of an existing histogram object. |
heatmap | Heatmap chart that shows a matrix, or two table variables, as colored cells. |
hist | Counts data into equally spaced bins and draws a histogram, or returns the counts and centers. |
histc | Counts how many values fall in each interval defined by a vector of bin edges. |
histogram | Plots a histogram of the data and returns an object with the bins and counts. |
histogram2 | Bivariate histogram that counts pairs of values in a grid of bins and draws it as 3-D bars. |
morebins | Increases the number of bins of an existing histogram object. |
parallelplot | Parallel coordinates plot, one line per observation across several variables. |
pie | Pie chart of the values in a vector, with percentage labels. |
pie3 | Three-dimensional pie chart of the values in a vector. |
piechart | Pie chart object with names, labels and a title, from a vector or a table. |
plotmatrix | Matrix of scatter plots of the columns of a data matrix against each other. |
rose | Angle histogram drawn on polar axes as a rose diagram. |
scatter | Scatter plot: markers at given positions, with optional size and color for each point. |
scatter3 | 3-D scatter plot: markers at given 3-D positions, with optional size and color. |
scatterhistogram | Scatter plot with histograms of each variable along its edges. |
sortx | Sorts the columns of a heatmap by the values in one of its rows. |
sorty | Sorts the rows of a heatmap by the values in one of its columns. |
swarmchart | Draws a scatter plot whose points are spread sideways to avoid overlap. |
swarmchart3 | Draws a 3-D scatter plot whose points are spread sideways to avoid overlap. |
wordcloud | Draws words sized by their frequency or by a weight. |
Contour Plots
clabel | Adds value labels to the lines of a contour plot. |
contour | Draws contour lines, the curves along which a function of two variables is constant. |
contour3 | Draws contour lines at their own height in a 3-D view. |
contourc | Computes contour line coordinates without drawing them. |
contourf | Draws filled contour plots. |
contourslice | Draws contour lines on slice planes of 3-D volume data. |
ezcontour | Contour plot of a function of two variables given as a handle or expression, without building a grid. |
ezcontourf | Filled contour plot of a function of two variables given as a handle or expression. |
fcontour | Contour plot of a function of two variables, given as a handle. |
Polar Plots
compass | Draws vectors as arrows that start at the origin of a polar-style plot. |
ezpolar | Plots a function given in polar form, radius as a function of angle. |
polar | Plots a curve in polar coordinates from angles and radii. |
polaraxes | Creates polar axes in the current figure and returns them. |
polarbubblechart | Bubble chart in polar coordinates, with the bubble area given by a third variable. |
polarhistogram | Histogram of angles drawn on polar axes. |
polarplot | Plots lines on polar axes from angles and radii. |
polarscatter | Scatter plot of points given in polar coordinates. |
rlim | Sets or queries the radial limits of polar axes. |
rtickangle | Sets or queries the rotation of the radial tick labels of polar axes. |
rtickformat | Sets or queries the number format of the radial tick labels of polar axes. |
rticklabels | Sets or queries the text of the radial tick labels of polar axes. |
rticks | Sets or queries the positions of the radial ticks of polar axes. |
thetalim | Gets or sets the angular limits of a polar axes. |
thetatickformat | Gets or sets the format of the angular tick labels of a polar axes. |
thetaticklabels | Gets or sets the text of the angular tick labels of a polar axes. |
thetaticks | Gets or sets the angular tick positions of a polar axes. |
Surfaces, Volumes, and Polygons
coneplot | Draws 3-D vectors of a vector field as cones. |
curl | Curl and angular velocity of a vector field. |
cylinder | Generates the coordinates of a surface of revolution, by default a cylinder. |
divergence | Divergence of a vector field. |
ellipsoid | Generates the coordinates of an ellipsoid. |
ezmesh | Mesh surface plot of a function of two variables given as a handle or expression. |
ezmeshc | Mesh surface plot with a contour plot underneath, from a function handle or expression. |
ezsurf | Shaded surface plot of a function of two variables given as a handle or expression. |
ezsurfc | Shaded surface plot with a contour plot underneath, from a function handle or expression. |
fill | Draws filled 2-D polygons from vertex coordinates. |
fill3 | Draws filled polygons in 3-D space from vertex coordinates. |
fmesh | Mesh surface plot of a function of two variables, given as a handle. |
fsurf | Shaded surface plot of a function of two variables, given as a handle. |
hidden | Turns hidden-line removal on or off for mesh plots. |
interpstreamspeed | Resamples stream line vertices so that their spacing is proportional to the local speed of the vector field. |
isocaps | Computes the faces that close the open ends of an isosurface where it meets the volume boundary. |
isocolors | Computes the colors of isosurface vertices from a second volume of data. |
isonormals | Computes surface normals of an isosurface from the gradient of the volume data. |
isosurface | Extracts the surface where 3-D volume data equals a chosen value, as faces and vertices. |
mesh | Draws a wireframe surface from a matrix of heights. |
meshc | Draws a wireframe surface with a contour plot beneath it. |
meshz | Draws a wireframe surface with a curtain around its edges. |
pcolor | Pseudocolor plot: a flat grid of colored cells whose colors come from a matrix. |
peaks | Sample function of two variables made of Gaussian peaks, used to try out surface plots. |
reducepatch | Reduces the number of faces of a patch while trying to keep its shape. |
reducevolume | Keeps every n-th sample of 3-D volume data along each direction. |
ribbon | Draws the columns of a matrix as 3-D ribbons. |
shrinkfaces | Shrinks each face of a patch toward its center, leaving gaps between faces. |
slice | Draws slice planes through volumetric data. |
smooth3 | Smooths a 3-D data array with a box or Gaussian filter. |
sphere | Generates the coordinates of a unit sphere, or draws it. |
stream2 | Computes 2-D streamline vertices of a vector field. |
stream3 | Computes 3-D streamline vertices of a vector field. |
streamparticles | Draws particles moving along streamlines. |
streamribbon | Draws 3-D stream ribbons that twist with the flow. |
streamtube | Draws 3-D stream tubes whose width follows the divergence of the flow. |
subvolume | Extracts a rectangular part of a volume data set. |
surf | Draws a 3-D surface colored by height. |
surf2patch | Converts surface data into patch faces and vertices. |
surface | Low-level function that creates a surface object in the current axes. |
surfc | Draws a 3-D surface with a contour plot underneath. |
surfl | Draws a 3-D surface with lighting based on a light source. |
surfnorm | Computes the normal vectors of a surface. |
volumebounds | Returns the coordinate and color limits of volume data. |
waterfall | Draws a mesh with lines in one direction only, like a waterfall of curves. |
Line Plots
errorbar | Plots data with error bars. |
ezplot | Plots a function of one variable, or an implicit or parametric curve, from a handle or expression. |
ezplot3 | Plots a 3-D parametric curve from three coordinate functions of a parameter. |
fimplicit | Plots an implicit curve defined by f(x,y) = 0. |
fplot | Plots a function of one variable, or a parametric curve, from a handle over an interval. |
fplot3 | Plots a 3-D parametric curve from three coordinate functions given as handles. |
loglog | Plots data with logarithmic scales on both axes. |
plot3 | Plots lines and points in 3-D space. |
semilogx | Plots a line with a base-10 logarithmic x-axis and a linear y-axis. |
semilogy | Plots a line with a linear x-axis and a base-10 logarithmic y-axis. |
stairs | Plots data as a stairstep graph, holding each value until the next point. |
Vector Fields
feather | Plots vectors as arrows that start from equally spaced points on a horizontal line. |
quiver | Plots a 2-D vector field as arrows. |
quiver3 | Plots a 3-D vector field as arrows. |
streamline | Draws streamlines from precomputed vertices. |
streamslice | Draws streamlines with direction arrows, evenly spaced across a vector field. |
Geographic Plots
geobubble | Bubble chart of data located by latitude and longitude on a map. |