Sub Main 'Declare the variable that will reference the application 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") 'Make Grapher visible GrapherApp.Visible = True 'Declare Plot As Object Dim Plot As Object 'Creates a new plot window and assign it to the variable named "Plot" Set Plot = GrapherApp.Documents.Add(grfPlotDoc) 'Add LinePlotGraph Dim Graph1 As Object Set Graph1 = Plot.Shapes.AddLinePlotGraph(GrapherApp.Path + "\samples\sample3.dat") 'Add second curve Graph1.AddLinePlot(GrapherApp.Path + "\samples\sample3.dat",,3) 'Add third curve Graph1.AddLinePlot(GrapherApp.Path + "\samples\sample3.dat",,4) 'Add legend Set Legend = Graph1.AddLegend(True) 'Change entry font for all lines i=1 While i <= Legend.EntryCount Legend.EntryFont(i).face = "Times New Roman" Legend.EntryFont(i).Bold = True Legend.EntryFont(i).color = grfColorGreen Legend.EntryFont(i).Italic = True Legend.EntryFont(i).size = 8 i=i+1 Wend End Sub