Sub Main 'Declare Objects Dim GrapherApp, Plot, Graph, WindChart As Object 'Creates an instance of Grapher named "GrapherApp" Set GrapherApp = CreateObject("Grapher.Application") 'Make Grapher visible GrapherApp.Visible = True 'Creates a new plot document and assigns it to the variable named "Plot" Set Plot = GrapherApp.Documents.Add(grfPlotDoc) 'Creates a graph and assigns it to the variable named "Graph" Set Graph = Plot.Shapes.AddWindChartGraph(GrapherApp.Path+ "\samples\wind data.dat") 'Set WindChart to the first plot on the Graph graph Set WindChart = Graph.Plots.Item(1) 'Set the columns WindChart.dataCol = 1 WindChart.speedCol = 2 'Set the angular size of automatic bins to 45 degrees WindChart.binSize = 45 'Turn auto arc size off for automatic bins WindChart.ArcSizeAuto = False 'Set the arc size of the automatic bins to 10 degrees WindChart.ArcSize = 10 'Set the starting place for the bins WindChart.StartAt = 22.5 'Add a legend to the graph WindChart.DisplayLegend = True 'Display the speed bins as percents then as relative frequency WindChart.DisplayAsPercent = True WindChart.DisplayAsFreq = True 'Delete existing speed bins WindChart.DeleteAllBins 'Set the bins to custom bins WindChart.AutoBin = False 'Set the new angle limits for each bin WindChart.AddBin(0,45) WindChart.AddBin(45,90) WindChart.AddBin(90,270) WindChart.AddBin(270,270,,True) 'Delete the last angle limits bin WindChart.DeleteBin(4) 'Turn on automatic binning WindChart.AutoBin = True 'Delete all existing wind speed bins WindChart.DeleteAllSpeedBins 'Create new speed bins WindChart.AddSpeedBin(0,2,True) ' This one has no minimum WindChart.SpeedBinFill(1).foreColor = RGB(120,75,135) WindChart.AddSpeedBin(2,4) WindChart.SpeedBinFill(2).foreColor = RGB(88,85,162) WindChart.AddSpeedBin(4,6) WindChart.SpeedBinFill(3).foreColor = RGB(69,123,186) WindChart.AddSpeedBin(6,8) WindChart.SpeedBinFill(4).foreColor = RGB(41,163,205) WindChart.AddSpeedBin(8,10) WindChart.SpeedBinFill(5).foreColor = RGB(63,151,155) WindChart.AddSpeedBin(10,12) WindChart.SpeedBinFill(6).foreColor = RGB(98,164,100) WindChart.AddSpeedBin(12,14) WindChart.SpeedBinFill(7).foreColor = RGB(181,204,97) WindChart.AddSpeedBin(14,16) WindChart.SpeedBinFill(8).foreColor = RGB(239,198,89) WindChart.AddSpeedBin(16,18) WindChart.SpeedBinFill(9).foreColor = RGB(233,155,95) WindChart.AddSpeedBin(18,18,,True) ' This one has no maximum WindChart.SpeedBinFill(10).foreColor = RGB(209,106,94) 'Change the line style and color WindChart.line.style = "Solid" WindChart.line.foreColor = grfColorWhite End Sub