Parametric Equations

GnuPlot includes support for Parametric Equations. To switch to parametric mode, type the following: To go back to standard Cartesian mode, type: For example, to see the plot of the set of equations x = 5 cos t and y = 2 sin t, you could type the following:

The xrange and yrange values specify the range of the graph displayed. The set trange command sets the range that is used to compute the parametric equations. If you use brackets to set a range within the plot command, it will refer to the trange. The first part of the plot command before the comma is the x equation, and the second part is the y equation.
For another example, consider trying to plot the cycloid x = t - sin t and y = 1 - cos t.

3D Parametric Plots

Gnuplot also supports 3D parametric plots. It uses the the variables u and v. 3D paramettric plots use the xrange, yrange, and zrange values to determine what is displayed on the screen. The urange and vrange variables can be changed to determine how much of the graph is drawn. For example,:

If you changed the urange and vrange parameters, you would get a differant graph.

Many of the standard 3D features apply to 3D parameter plots (you can use isosamples, views, and hidden3d).


Table of Contents - Previous - Changing Perspectives - Next - Polar Plots
College of Natural Sciences / University of Northern Iowa / manager@cns.uni.edu

Copyright © 1996 College of Natural Sciences. All Rights Reserved.
Last Modified: 11/4/96