Navigation:  Menu Commands > Generate Menu >

X=f(T), Y=g(T) command (Generate menu)

JR   Viewer

Print this Topic Previous pageReturn to chapter overviewNext page

Generates X,Y pairs from parametrical equations in which X and Y are both functions of a third independent parameter T. This command is useful for plotting curves in which Y cannot be expressed as a unique function of X. For example a circle may be plotted with X=cos(T), Y=sin(T). You might also find this command useful for generating unevenly-spaced data points. For example if you want your points to be evenly spaced on a logarithmic scale, you can use X=10^(T), Y=some function of (10^(T)).

Available operators are +, -, *, /, ^,>,<, and =. The inequality operators (>, <, and =)  result in 1.0 if the condition is true, 0.0 otherwise.

Function (sin, cos, etc.) arguments must be in parentheses. See the list of available functions.

You can use placeholder codes for certain data parameters. For example “$YMAX(2)” will be replaced with the maximum Y value of the second curve. For more information on placeholder codes click here.

You can create conditional equations with the if function. The if function takes the form if(test,if_true,if_false), where test is the condition you want to check, if_true is the value the equation takes if test is true, and if_false is the value taken if test is false. For example, "if t > 5 then y=t^2, otherwise y=(10-t)^2" can be expressed with if(t<5,t^2,(10-t)^2).

By default, angular input values are in radians. You can set angles to degrees by clicking the degrees option button.

DPlot will automatically substitute the value of pi (3.141592653589793...) for "PI", "pi", or "Pi"

NOTE: Be specific. DPlot does not interpret "2T" as "2*T".


With radians selected,



from T=0 to 6.28 results in:

Prevent divide by zero errors

If this box is unchecked, DPlot will trap divide by zero and many other math errors (e.g. logarithm of a non-positive value), report the value of T where the error occurred, and will not generate a curve. If this box is checked, when DPlot traps a math error it will shift T by a very small number and attempt the calculation again. This feature might be useful for generating curves of certain functions that would normally fail at specific values of T.


You can specify up to 10 constants to use in place of numerical values in your equation. Often the use of constants will make your equation more readable and less error-prone.

Expand constants in legend

If unchecked, the legend for a generated curve will generally match the equations as entered (plus a few formatting changes for subscripts and superscripts). If checked, any constants in the equation will be replaced by their numeric values. If this expansion results in a character string longer than 80 characters, the constants A,B,C,etc. will be used.

Tip: You can hide the legend by right-clicking and selecting Hide Legend. Move the legend by clicking and dragging. Other legend parameters are accessible via the right-click menu, or by selecting the Legend/Labels command on the Text menu.


Open/Save as

These buttons allow you to read or save the entire setup for this function, including the equations, extents, constants, and other options. This might be handy if you have an operation that you frequently use. We strongly suggest that you use the default folder location when saving a setup, so that you don't confuse the setup for this function with that for the Y=f(X) or Y=f(X,Y1,Y2,...) commands. (The saved files for the various Generate commands are not compatible.)


Page url: