AutoPlots Collection
The AutoPlots collection allows access to all plots in a graph and it is accessed via the AutoGraph object.
Properties
Methods
Example
This example shows how to access a line graph.
Sub Main
'Declares GrapherApp as an object
Dim GrapherApp As Object
'Creates an instance of the Grapher Application object
'and assigns it to the variable named "GrapherApp"
Set GrapherApp = CreateObject("Grapher.Application")
'Makes Grapher visible
GrapherApp.Visible = True
'Declares Plot as an object
Dim Plot As Object
'Creates a plot document in Grapher and
'assigns it to the variable named "Plot"
Set Plot = GrapherApp.Documents.Add(grfPlotDoc)
'Declares Shapes as an object
Dim Shapes As Object
'Assigns the AutoShapes collection to the
'variable named "Shapes"
Set Shapes = Plot.Shapes
'Declares LineGraph as an object
Dim Plots As Object
'Creates a graph and assigns it to the
'variable named "LineGraph"
Set LineGraph = Shapes.AddLinePlotGraph(GrapherApp.Path+"\samples\bar chart orientations.dat")
'Declare Plots as an object
Dim Plots As Object
'Set Plots to the Plot Collection on
'the LineGraph graph
Set Plots = LineGraph.Plots
End Sub