1 Functions By Category
Graphics
2-D graphs, specialized plots (e.g., pie charts, histograms, and contour plots),
function plotters, and Handle Graphics functions.
Category Description
Basic Plots and Graphs Linear line plots, log and semilog plots
Annotating Plots Titles, axes labels, legends, mathematical
symbols
Specialized Plotting Bar graphs, histograms, pie charts, contour
plots, function plotters
Bit-Mapped Images Display image object, read and write graphics
file, convert to movie frames
Printing Printing and exporting figures to standard
formats
Handle Graphics Creating graphics objects, setting properties,
finding handles
Basic Plots and Graphs
box Axis box for 2-D and 3-D plots
errorbar Plot graph with error bars
hold Hold current graph
loglog Plot using log-log scales
polar Polar coordinate plot
plot Plot vectors or matrices.
plot3 Plot lines and points in 3-D space
plotyy Plot graphs with Y tick labels on the left and right
semilogx Semi-log scale plot
semilogy Semi-log scale plot
subplot Create axes in tiled positions
Annotating Plots
clabel Add contour labels to contour plot
datetick Date formatted tick labels
1-38
Graphics
gtext Place text on 2-D graph using mouse
legend Graph legend for lines and patches
texlabel Produce the TeX format from character string
title Titles for 2-D and 3-D plots
xlabel X-axis labels for 2-D and 3-D plots
ylabel Y-axis labels for 2-D and 3-D plots
zlabel Z-axis labels for 3-D plots
Specialized Plotting
• “Area, Bar, and Pie Plots”
• “Contour Plots”
• “Direction and Velocity Plots”
• “Discrete Data Plots”
• “Function Plots”
• “Histograms”
• “Polygons and Surfaces”
• “Scatter Plots”
Area, Bar, and Pie Plots
area Area plot
bar Vertical bar chart
barh Horizontal bar chart
bar3 Vertical 3-D bar chart
bar3h Horizontal 3-D bar chart
pareto Pareto char
pie Pie plot
pie3 3-D pie plot
Contour Plots
contour Contour (level curves) plot
contourc Contour computation
contourf Filled contour plot
ezcontour Easy to use contour plotter
ezcontourf Easy to use filled contour plotter
Direction and Velocity Plots
comet Comet plot
comet3 3-D comet plot
1-39
1 Functions By Category
compass Compass plot
feather Feather plot
quiver Quiver (or velocity) plot
quiver3 3-D quiver (or velocity) plot
Discrete Data Plots
stem Plot discrete sequence data
stem3 Plot discrete surface data
stairs Stairstep graph
Function Plots
ezcontour Easy to use contour plotter
ezcontourf Easy to use filled contour plotter
ezmesh Easy to use 3-D mesh plotter
ezmeshc Easy to use combination mesh/contour plotter
ezplot Easy to use function plotter
ezplot3 Easy to use 3-D parametric curve plotter
ezpolar Easy to use polar coordinate plotter
ezsurf Easy to use 3-D colored surface plotter
ezsurfc Easy to use combination surface/contour plotter
fplot Plot a function
Histograms
hist Plot histograms
histc Histogram count
rose Plot rose or angle histogram
Polygons and Surfaces
convhull Convex hull
cylinder Generate cylinder
delaunay Delaunay triangulation
dsearch Search Delaunay triangulation for nearest point
ellipsoid Generate ellipsoid
fill Draw filled 2-D polygons
fill3 Draw filled 3-D polygons in 3-space
inpolygon True for points inside a polygonal region
pcolor Pseudocolor (checkerboard) plot
polyarea Area of polygon
ribbon Ribbon plot
slice Volumetric slice plot
sphere Generate sphere
1-40
Graphics
tsearch Search for enclosing Delaunay triangle
voronoi Voronoi diagram
waterfall Waterfall plot
Scatter Plots
plotmatrix Scatter plot matrix
scatter Scatter plot
scatter3 3-D scatter plot
Bit-Mapped Images
frame2im Convert movie frame to indexed image
image Display image object
imagesc Scale data and display image object
imfinfo Information about graphics file
im2frame Convert image to movie frame
imread Read image from graphics file
imwrite Write image to graphics file
ind2rgb Convert indexed image to RGB image
Printing
orient Hardcopy paper orientation
pagesetupdlg Page position dialog box
print Print graph or save graph to file
printdlg Print dialog box
printopt Configure local printer defaults
printpreview Preview figure to be printed
saveas Save figure to graphic file
Handle Graphics
• Finding and Identifying Graphics Objects
• Object Creation Functions
• Figure Windows
• Axes Operations
Finding and Identifying Graphics Objects
allchild Find all children of specified objects
copyobj Make copy of graphics object and its children
1-41
1 Functions By Category
delete Delete files or graphics objects
findall Find all graphics objects (including hidden handles)
findobj Find objects with specified property values
gca Get current Axes handle
gcbo Return object whose callback is currently executing
gcbf Return handle of figure containing callback object
gco Return handle of current object
get Get object properties
ishandle True if value is valid object handle
rotate Rotate objects about specified origin and direction
set Set object properties
Object Creation Functions
axes Create axes object
figure Create figure (graph) windows
image Create image (2-D matrix)
light Create light object (illuminates Patch and Surface)
line Create line object (3-D polylines)
patch Create patch object (polygons)
rectangle Create rectangle object (2-D rectangle)
surface Create surface (quadrilaterals)
text Create text object (character strings)
uicontextmenu Create context menu (popup associated with object)
Figure Windows
capture Screen capture of the current figure
clc Clear figure window
clf Clear figure
close Close specified window
closereq Default close request function
drawnow Complete any pending drawing
gcf Get current figure handle
newplot Graphics M-file preamble for NextPlot property
refresh Refresh figure
saveas Save figure or model to desired output format
Axes Operations
axis Plot axis scaling and appearance
cla Clear Axes
gca Get current Axes handle
grid Grid lines for 2-D and 3-D plots
1-42