Sub Main Dim GrapherApp, Docs, Plot, ScatterPlot As Object Set GrapherApp = CreateObject("Grapher.Application") GrapherApp.Visible = True Set Docs = GrapherApp.Documents Set Plot = Docs.Add(grfPlotDoc) 'Creates a line plot and assigns the graph and plot to variable names Set Graph = Plot.Shapes.AddLinePlotGraph(GrapherApp.Path+"\samples\tutorial.dat") Set ScatterPlot = Graph.Plots.Item(1) 'Adjusts the symbol and line properties for the plot ScatterPlot.symbolFreq = 1 ScatterPlot.symbol.Index = 30 ScatterPlot.symbol.size = 0.25 ScatterPlot.symbol.color = RGB(0,0,255) ScatterPlot.symbol.lineColor = grfColorBlue ScatterPlot.line.style("invisible") 'Adds a polynomial fit curve to the plot Set FitPolynomial = Graph.Plots(1).AddFit(grfPolynomialFit) FitPolynomial.Option=4 FitPolynomial.line.foreColor(grfColorGrassGreen) FitPolynomial.line.width=0.03 'Adds a spline fit curve to the plot Set FitSpline = Graph.Plots(1).AddFit(grfSplineFit) FitSpline.line.foreColor(grfColorNavyBlue) FitSpline.line.width=0.03 FitSpline.Option=15 'Adds a running average fit curve to the plot Set FitRunningAvg = Graph.Plots(1).AddFit(grfRunningAvgFit) FitRunningAvg.line.foreColor(grfColorAutumnOrange) FitRunningAvg.line.width=0.03 FitRunningAvg.Option=9 'Adds a weighted average fit curve to the plot Set FitWeightedAvg = Graph.Plots(1).AddFit(grfWeightedAvgFit) FitWeightedAvg.line.foreColor(grfColorRubyRed) FitWeightedAvg.line.width=0.03 FitWeightedAvg.Option=3 End Sub