Graphics Programs Reference
In-Depth Information
mesh Draws a meshsurface.
[X,Y] = meshgrid(-2:.1:2, -2:.1:2);
mesh(X, Y, sin(pi*X).*cos(pi*Y))
meshgrid Creates a vector array that can be used as input to a graphics command,
for example, contour, quiver, or surf .
[X, Y] = meshgrid(0:0.1:1, 0:0.1:2)
contour(X, Y, X.ˆ2 + Y.ˆ2)
movie Plays back a movie. See the entry for getframe .
patch Creates a filled polygon or colored surface patch. See also fill .
t = (0:1:5)*2*pi/5; patch(cos(t), sin(t), 'r'); axis equal
pie Draws a pie plot of the data in the input vector.
Z = [34 5 32 6]; pie(Z)
plot Plots vectors of data.
X = [0:0.1:2];
plot(X, X.ˆ3)
plot3 Plots curves in 3D space.
t = [0:0.1:30];
plot3(t, t.*cos(t), t.*sin(t))
polar Polar coordinate plot command.
theta = 0:0.1:2*pi; rho = theta; polar(theta, rho)
print Sends the contents of the current figure window to the printer or to a file.
print
print -deps picture.eps
quiver Plots a (numerical) vector field in the plane.
[x, y] = meshgrid(-4:0.5:4, -4:0.5:4);
quiver(x, y, x.*(y - 2), y.*x); axis tight
semilogy Creates a semilog plot, with logarithmic scale along the vertical axis.
x = 0:0.1:12; semilogy(x, exp(x))
set Set properties of a figure.
set(gcf, 'Color', [0, 0.8, 0.8])
subplot Breaks the figure window into a grid of smaller plots.
subplot(2, 2, 1), ezplot('xˆ2')
subplot(2, 2, 2), ezplot('xˆ3')
Search WWH ::




Custom Search