Sub Main 'Initialize Grapher Dim GrapherApp, Docs, Plot, Graph1 As Object Set GrapherApp = CreateObject("Grapher.Application") GrapherApp.Visible = True Set Docs = GrapherApp.Documents Set Plot = Docs.Add(grfPlotDoc) '========================= 'User-defined variables '========================= 'File path and name File=GrapherApp.Path + "\Samples\Sample3.dat" 'Total number of plots to create numplots = 3 '========================= 'Create a line plot Set Graph1 = Plot.Shapes.AddLinePlotGraph(File,1,2) 'Define the first y column to add a plot using plotcol = 3 'Set the last y column to add a plot using lastplotcol = plotcol + numplots - 1 'Loop through all y columns to add a plot using While plotcol < lastplotcol 'Adds a line plot using column A as X and the next column as Y Graph1.AddLinePlot(File,1,plotcol,,,) plotcol =plotcol +1 Wend End Sub