Sub Main 'This script shows how to create two bar charts and make them adjacent to each other 'Declares objects Dim GrapherApp, Plot, Graph, BarChart1 As Object 'Creates an instance of the Grapher Application named "GrapherApp" Set GrapherApp = CreateObject("Grapher.Application") 'Makes Grapher Visible GrapherApp.Visible = True 'Creates a plot document in Grapher named "Plot" Set Plot = GrapherApp.Documents.Add(grfPlotDoc) 'Create a bar chart Set Graph = Plot.Shapes.AddBarChartGraph(GrapherApp.Path+"\samples\bar chart orientations.dat",,,) 'Assign the bar chart to the object name BarChart1 Set BarChart1 = Graph.Plots.Item(1) 'Set the bars to use only rows 1-10 BarChart1.AutoLastRow = False BarChart1.LastRow = 10 'Set the bar fill to the default color table BarChart1.UseColorTable = True 'Turns off the axes titles Graph.Axes.Item(1).Title.Text = "" Graph.Axes.Item(2).Title.Text = "" 'Sets a custom x axis maximum value Graph.Axes.Item(1).AutoMax = False Graph.Axes.Item(1).Max = 10.5 'Turns on the color table legend BarChart1.ShowColorTableLegend = True End Sub