AddLinePlot Method
The AddLinePlot method adds a 2D line/scatter plot to an existing 2D graph, equivalent to Graph | Add to Graph | Plot. Returns an AutoLinePlot object.
Syntax
object.AddLinePlot( worksheet, xCol, yCol, xAxis, yAxis, id )
Parameter | Type | Description |
worksheet | String | required, full path and file name of the data |
xCol | Variant | optional, default = 1 (column A) |
yCol | Variant | optional, default = 2 (column B) |
xAxis | Variant | optional, ID of X axis to use for plot (default = uses first X axis in graph) |
yAxis | Variant | optional, ID of Y axis to use for plot (default = uses first Y axis in graph) |
id | Variant | optional, plot name |
Remarks
2D graphs can only be added to other 2D graphs.
Example
This example shows how to add a line plot.
Graph1.AddLinePlot( GrapherApp.Path + "\samples\bar chart orientations.dat")
Used by: AutoGraph object
See Also