<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!--Converted with LaTeX2HTML 2008 (1.71) original version by: Nikos Drakos, CBLU, University of Leeds * revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan * with significant contributions from: Jens Lippmann, Marek Rouchal, Martin Wilck and others --> <HTML> <HEAD> <TITLE>Parametric</TITLE> <META NAME="description" CONTENT="Parametric"> <META NAME="keywords" CONTENT="gnuplot"> <META NAME="resource-type" CONTENT="document"> <META NAME="distribution" CONTENT="global"> <META NAME="Generator" CONTENT="LaTeX2HTML v2008"> <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> <LINK REL="STYLESHEET" HREF="gnuplot.css"> <LINK REL="next" HREF="node244.html"> <LINK REL="previous" HREF="node242.html"> <LINK REL="up" HREF="node175.html"> <LINK REL="next" HREF="node244.html"> </HEAD> <BODY > <!--Navigation Panel--> <A NAME="tex2html4701" HREF="node244.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> <A NAME="tex2html4695" HREF="node175.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> <A NAME="tex2html4689" HREF="node242.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> <A NAME="tex2html4697" HREF="node1.html"> <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> <A NAME="tex2html4699" HREF="node467.html"> <IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> <BR> <B> Next:</B> <A NAME="tex2html4702" HREF="node244.html">Plot</A> <B> Up:</B> <A NAME="tex2html4696" HREF="node175.html">Set-show</A> <B> Previous:</B> <A NAME="tex2html4690" HREF="node242.html">Output</A> <B> <A NAME="tex2html4698" HREF="node1.html">Contents</A></B> <B> <A NAME="tex2html4700" HREF="node467.html">Index</A></B> <BR> <BR> <!--End of Navigation Panel--> <H2><A NAME="SECTION0402450000000000000000"></A> <A NAME="commands_set_parametric"></A><A NAME="commands_unset_parametric"></A><A NAME="commands_show_parametric"></A><A NAME="set_parametric"></A><A NAME="unset_parametric"></A><A NAME="show_parametric"></A><A NAME="parametric"></A><A NAME="5706"></A> <A NAME="noparametric"></A><A NAME="5708"></A> <BR> Parametric </H2> The <B>set parametric</B> command changes the meaning of <B>plot</B> (<B>splot</B>) from normal functions to parametric functions. The command <B>unset parametric</B> restores the plotting style to normal, single-valued expression plotting. <P> Syntax: <BR> <PRE> set parametric unset parametric show parametric </PRE> <BR> <P> For 2D plotting, a parametric function is determined by a pair of parametric functions operating on a parameter. An example of a 2D parametric function would be <B>plot sin(t),cos(t)</B>, which draws a circle (if the aspect ratio is set correctly -- see <B>set size (p. <A HREF="node260.html#set_size"><IMG ALIGN="BOTTOM" BORDER="1" ALT="[*]" SRC="crossref.png"></A>)<A NAME="5717"></A></B>). <B>gnuplot</B> will display an error message if both functions are not provided for a parametric <B>plot</B>. <P> For 3D plotting, the surface is described as x=f(u,v), y=g(u,v), z=h(u,v). Therefore a triplet of functions is required. An example of a 3D parametric function would be <B>cos(u)*cos(v),cos(u)*sin(v),sin(u)</B>, which draws a sphere. <B>gnuplot</B> will display an error message if all three functions are not provided for a parametric <B>splot</B>. <P> The total set of possible plots is a superset of the simple f(x) style plots, since the two functions can describe the x and y values to be computed separately. In fact, plots of the type t,f(t) are equivalent to those produced with f(x) because the x values are computed using the identity function. Similarly, 3D plots of the type u,v,f(u,v) are equivalent to f(x,y). <P> Note that the order the parametric functions are specified is xfunction, yfunction (and zfunction) and that each operates over the common parametric domain. <P> Also, the <B>set parametric</B> function implies a new range of values. Whereas the normal f(x) and f(x,y) style plotting assume an xrange and yrange (and zrange), the parametric mode additionally specifies a trange, urange, and vrange. These ranges may be set directly with <B>set trange</B>, <B>set urange</B>, and <B>set vrange</B>, or by specifying the range on the <B>plot</B> or <B>splot</B> commands. Currently the default range for these parametric variables is [-5:5]. Setting the ranges to something more meaningful is expected. <HR> <!--Navigation Panel--> <A NAME="tex2html4701" HREF="node244.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> <A NAME="tex2html4695" HREF="node175.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> <A NAME="tex2html4689" HREF="node242.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> <A NAME="tex2html4697" HREF="node1.html"> <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> <A NAME="tex2html4699" HREF="node467.html"> <IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> <BR> <B> Next:</B> <A NAME="tex2html4702" HREF="node244.html">Plot</A> <B> Up:</B> <A NAME="tex2html4696" HREF="node175.html">Set-show</A> <B> Previous:</B> <A NAME="tex2html4690" HREF="node242.html">Output</A> <B> <A NAME="tex2html4698" HREF="node1.html">Contents</A></B> <B> <A NAME="tex2html4700" HREF="node467.html">Index</A></B> <!--End of Navigation Panel--> <ADDRESS> 2010-08-17 </ADDRESS> </BODY> </HTML>