Next: 2.1.3.5 Scatter Plots
Up: 2.1.3 Other 2-D plots
Previous: 2.1.3.3 Plots with error
  Contents
In a parametric plot, the two plotting coordinates (say
and
) are a
function of a third variable. In other words, the two plotting coordinates
are both dependent variables of a third independent
coordinate. Here is an example where
and
are both functions of
.
% Plotting parametrically
close all; clear all;
t = linspace(0,3*pi,100); % 50 equally spaced points between 0 and pi
x = t.*cos(t); % Again, the .* means multiply element by element
y = t.*sin(t); % rather than matrix or vector multiplication
plot(x,y)
axis equal % Make the scaling the same on both axes
Note that no special MATLAB command was needed to make the parametric
plot--the data was merely defined differently from a ``normal''
plot.
Gus Hart
2005-01-28