Graphics > 2-D and 3-D Plots

136 functions in MATLAB › Graphics > 2-D and 3-D Plots.

Animation

addpointsAppends points to an animated line.
animatedlineCreates a line that grows as points are added to it.
clearpointsRemoves all the points of an animated line.
cometAnimates a 2-D curve with a moving head and a trailing tail.
comet3Animates a 3-D curve with a moving head and a trailing tail.
drawnowUpdates the figures and processes pending events right away.
frame2imConverts a movie frame into image data and a colormap.
getframeCaptures the current axes or figure as a movie frame.
getpointsReturns the coordinates of the points stored in an animated line.
im2frameConverts an image into a movie frame structure.
moviePlays a sequence of movie frames in a figure.

Discrete Data Plots

barDraws a bar chart.
bar3Draws a 3-D bar chart.
bar3hDraws a 3-D bar chart with horizontal bars.
barhDraws a horizontal bar chart.
paretoPareto chart: bars sorted in descending order with a line of the cumulative percentage.
stemPlots discrete data as vertical stems ending in markers.
stem3Plots three-dimensional discrete data as stems from the xy-plane.

Data Distribution Plots

binscatterShows the density of scattered points by counting them in rectangular bins.
boxchartDraws box plots that summarize the distribution of data.
bubblechartDraws a scatter plot whose markers vary in size and color.
bubblechart3Draws a 3-D scatter plot whose markers vary in size and color.
bubblecloudDraws a packed cloud of circles whose areas are proportional to the data values.
bubblelegendAdds a legend that explains the bubble sizes of a bubble chart.
bubblelimSets the range of data values that the bubble sizes cover.
bubblesizeSets the smallest and largest bubble size, in points.
donutchartDraws a donut chart, a pie chart with a hole in the middle.
fewerbinsReduces the number of bins of an existing histogram object.
heatmapHeatmap chart that shows a matrix, or two table variables, as colored cells.
histCounts data into equally spaced bins and draws a histogram, or returns the counts and centers.
histcCounts how many values fall in each interval defined by a vector of bin edges.
histogramPlots a histogram of the data and returns an object with the bins and counts.
histogram2Bivariate histogram that counts pairs of values in a grid of bins and draws it as 3-D bars.
morebinsIncreases the number of bins of an existing histogram object.
parallelplotParallel coordinates plot, one line per observation across several variables.
piePie chart of the values in a vector, with percentage labels.
pie3Three-dimensional pie chart of the values in a vector.
piechartPie chart object with names, labels and a title, from a vector or a table.
plotmatrixMatrix of scatter plots of the columns of a data matrix against each other.
roseAngle histogram drawn on polar axes as a rose diagram.
scatterScatter plot: markers at given positions, with optional size and color for each point.
scatter33-D scatter plot: markers at given 3-D positions, with optional size and color.
scatterhistogramScatter plot with histograms of each variable along its edges.
sortxSorts the columns of a heatmap by the values in one of its rows.
sortySorts the rows of a heatmap by the values in one of its columns.
swarmchartDraws a scatter plot whose points are spread sideways to avoid overlap.
swarmchart3Draws a 3-D scatter plot whose points are spread sideways to avoid overlap.
wordcloudDraws words sized by their frequency or by a weight.

Contour Plots

clabelAdds value labels to the lines of a contour plot.
contourDraws contour lines, the curves along which a function of two variables is constant.
contour3Draws contour lines at their own height in a 3-D view.
contourcComputes contour line coordinates without drawing them.
contourfDraws filled contour plots.
contoursliceDraws contour lines on slice planes of 3-D volume data.
ezcontourContour plot of a function of two variables given as a handle or expression, without building a grid.
ezcontourfFilled contour plot of a function of two variables given as a handle or expression.
fcontourContour plot of a function of two variables, given as a handle.

Polar Plots

compassDraws vectors as arrows that start at the origin of a polar-style plot.
ezpolarPlots a function given in polar form, radius as a function of angle.
polarPlots a curve in polar coordinates from angles and radii.
polaraxesCreates polar axes in the current figure and returns them.
polarbubblechartBubble chart in polar coordinates, with the bubble area given by a third variable.
polarhistogramHistogram of angles drawn on polar axes.
polarplotPlots lines on polar axes from angles and radii.
polarscatterScatter plot of points given in polar coordinates.
rlimSets or queries the radial limits of polar axes.
rtickangleSets or queries the rotation of the radial tick labels of polar axes.
rtickformatSets or queries the number format of the radial tick labels of polar axes.
rticklabelsSets or queries the text of the radial tick labels of polar axes.
rticksSets or queries the positions of the radial ticks of polar axes.
thetalimGets or sets the angular limits of a polar axes.
thetatickformatGets or sets the format of the angular tick labels of a polar axes.
thetaticklabelsGets or sets the text of the angular tick labels of a polar axes.
thetaticksGets or sets the angular tick positions of a polar axes.

Surfaces, Volumes, and Polygons

coneplotDraws 3-D vectors of a vector field as cones.
curlCurl and angular velocity of a vector field.
cylinderGenerates the coordinates of a surface of revolution, by default a cylinder.
divergenceDivergence of a vector field.
ellipsoidGenerates the coordinates of an ellipsoid.
ezmeshMesh surface plot of a function of two variables given as a handle or expression.
ezmeshcMesh surface plot with a contour plot underneath, from a function handle or expression.
ezsurfShaded surface plot of a function of two variables given as a handle or expression.
ezsurfcShaded surface plot with a contour plot underneath, from a function handle or expression.
fillDraws filled 2-D polygons from vertex coordinates.
fill3Draws filled polygons in 3-D space from vertex coordinates.
fmeshMesh surface plot of a function of two variables, given as a handle.
fsurfShaded surface plot of a function of two variables, given as a handle.
hiddenTurns hidden-line removal on or off for mesh plots.
interpstreamspeedResamples stream line vertices so that their spacing is proportional to the local speed of the vector field.
isocapsComputes the faces that close the open ends of an isosurface where it meets the volume boundary.
isocolorsComputes the colors of isosurface vertices from a second volume of data.
isonormalsComputes surface normals of an isosurface from the gradient of the volume data.
isosurfaceExtracts the surface where 3-D volume data equals a chosen value, as faces and vertices.
meshDraws a wireframe surface from a matrix of heights.
meshcDraws a wireframe surface with a contour plot beneath it.
meshzDraws a wireframe surface with a curtain around its edges.
pcolorPseudocolor plot: a flat grid of colored cells whose colors come from a matrix.
peaksSample function of two variables made of Gaussian peaks, used to try out surface plots.
reducepatchReduces the number of faces of a patch while trying to keep its shape.
reducevolumeKeeps every n-th sample of 3-D volume data along each direction.
ribbonDraws the columns of a matrix as 3-D ribbons.
shrinkfacesShrinks each face of a patch toward its center, leaving gaps between faces.
sliceDraws slice planes through volumetric data.
smooth3Smooths a 3-D data array with a box or Gaussian filter.
sphereGenerates the coordinates of a unit sphere, or draws it.
stream2Computes 2-D streamline vertices of a vector field.
stream3Computes 3-D streamline vertices of a vector field.
streamparticlesDraws particles moving along streamlines.
streamribbonDraws 3-D stream ribbons that twist with the flow.
streamtubeDraws 3-D stream tubes whose width follows the divergence of the flow.
subvolumeExtracts a rectangular part of a volume data set.
surfDraws a 3-D surface colored by height.
surf2patchConverts surface data into patch faces and vertices.
surfaceLow-level function that creates a surface object in the current axes.
surfcDraws a 3-D surface with a contour plot underneath.
surflDraws a 3-D surface with lighting based on a light source.
surfnormComputes the normal vectors of a surface.
volumeboundsReturns the coordinate and color limits of volume data.
waterfallDraws a mesh with lines in one direction only, like a waterfall of curves.

Line Plots

errorbarPlots data with error bars.
ezplotPlots a function of one variable, or an implicit or parametric curve, from a handle or expression.
ezplot3Plots a 3-D parametric curve from three coordinate functions of a parameter.
fimplicitPlots an implicit curve defined by f(x,y) = 0.
fplotPlots a function of one variable, or a parametric curve, from a handle over an interval.
fplot3Plots a 3-D parametric curve from three coordinate functions given as handles.
loglogPlots data with logarithmic scales on both axes.
plot3Plots lines and points in 3-D space.
semilogxPlots a line with a base-10 logarithmic x-axis and a linear y-axis.
semilogyPlots a line with a linear x-axis and a base-10 logarithmic y-axis.
stairsPlots data as a stairstep graph, holding each value until the next point.

Vector Fields

featherPlots vectors as arrows that start from equally spaced points on a horizontal line.
quiverPlots a 2-D vector field as arrows.
quiver3Plots a 3-D vector field as arrows.
streamlineDraws streamlines from precomputed vertices.
streamsliceDraws streamlines with direction arrows, evenly spaced across a vector field.

Geographic Plots

geobubbleBubble chart of data located by latitude and longitude on a map.