Graphics Programs Reference
In-Depth Information
bar Draws a bar graph.
bar([2, 7, 1.5, 6])
cla Clear axes.
close Closes the current figure window; close all closes all figure windows.
colormap Sets the colormap features of the current figure; type help graph3d to
see examples of colormaps.
X = 0:0.1:4*pi; Y = sin(X); colormap cool
comet Displays an animated parametric plot.
t = 0:0.1:4*pi; comet(t.*cos(t), t.*sin(t))
contour Plots the level curves of a function of two variables; usually used with
meshgrid .
[X, Y] = meshgrid(-3:0.1:3, -3:0.1:3);
contour(X, Y, X.ˆ2 - Y.ˆ2)
contourf Filled contour plot. Often used with colormap .
[X,Y] = meshgrid(-2:0.1:2, -2:0.1:2); contourf(X, Y, X.ˆ2 - Y.ˆ3);
colormap autumn
ezcontour Easy plot command for contour or level curves.
ezcontour('xˆ2 - yˆ2')
syms x y; ezcontour(x - yˆ2)
ezmesh Easy plot command for meshview of surfaces.
ezmesh('xˆ2 + yˆ2')
syms x y; ezmesh(x*y)
ezplot Easy plot command for symbolic expressions.
ezplot('exp(-xˆ2)', [-5, 5])
syms x; ezplot(sin(x))
ezplot3 Easy plot command for 3D parametric curves.
ezplot3('cos(t)', 'sin(t)', 't')
syms t; ezplot3(1 - cos(t), t - sin(t), t, [0 4*pi])
ezsurf Easy plot command for standard shaded view of surfaces.
ezsurf('(xˆ2 + yˆ2)*exp(-(xˆ2 + yˆ2))')
syms x y; ezsurf(sin(x*y), [-pi pi -pi pi])
figure Creates a new figure window.
fill Creates a filled polygon. See also patch .
fill([0 1 1 0], [0 0 1 1], 'b'); axis equal tight
Search WWH ::




Custom Search