AddFunctionPlot2 Method

The AddFunctionPlot2 method adds a 2D function plot to an existing 2D graph, equivalent to Graph | Add to Graph | Plot. Returns an AutoFunctionPlot object.

Syntax

object.AddFunctionPlot2( Type, function1, function2, firstValue, lastValue, xAxis, yAxis, id )

 

Parameter Type Description
Type grfFunctionPlotType required, function plot type (Y=F(X), X=F(Y), or parametric)
function1 String required,  function to plot (y=f(x), x=f(y), or
function2 Variant optional, function to plot ( y=g(T) if type is parametric; otherwise ignored)
firstValue Variant optional, first value to evaluate the function(s) at, default = 0
lastValue Variant optional, last value to evaluate the function(s) at, default = 25
id Variant optional, plot name

 

Remarks

2D graphs can only be added to other 2D graphs. See Mathematical Functions for information on writing function equations.

Example 1

This example shows how to add a function plot.

Graph1.AddFunctionPlot2( grfFunctionPlotYX, "2+x")

Example 2

This example shows how to add a parametric function plot.

Graph1.AddFunctionPlot2( grfFunctionPlotParametric, "2+cos(T)", "4*T")

Example 3

This example shows how to create an XY function plot.

Graph1.AddFunctionPlot2( grfFunctionPlotXY, "2*y")

 

Used by: AutoGraph object

See Also

AddFunctionPlotGraph2