Next: 18.104.22.168 Scatter Plots
Up: 2.1.3 Other 2-D plots
Previous: 22.214.171.124 Plots with error
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
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''