Sub Main 'This script shows all the methods 'and properties of a 3D XYZ bubble plot 'CSW 11/24/3 'Declares GrapherApp as an object 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") 'Makes Grapher visible GrapherApp.Visible = True 'Declares Plot as an object Dim Plot As Object 'Creates a plot document in Grapher and assigns 'it to the variable named "Plot" Set Plot = GrapherApp.Documents.Add(grfPlotDoc) 'Declares Shapes as an object Dim Shapes As Object 'Assigns the AutoShapes collection to the 'variable named "Shapes" Set Shapes = Plot.Shapes 'Declares XYZBubbleGraph as an object Dim XYZBubbleGraph As Object 'Creates a graph and assigns it to the 'variable named "XYZBubbleGraph" Set XYZBubbleGraph = Shapes.Add3DBubblePlotGraph(GrapherApp.Path+ _ "\samples\bubble.dat") 'Declare XYZBubblePlot as an object Dim XYZBubblePlot As Object 'Set XYZBubblePlot to the first line plot on the XYZBubbleGraph graph Set XYZBubblePlot = XYZBubbleGraph.Plots.Item(1) '******************************************************* 'Auto3DBubblePlot properties '******************************************************* 'Get current RadiusRange type Debug.Print "RadiusRange = "; XYZBubblePlot.RadiusRange 'Set RadiusRange to "Use fixed range" XYZBubblePlot.RadiusRange = grfUseFixedRange 'Get minimum range value Debug.Print "RadiusRangeMin = "; XYZBubblePlot.RadiusRangeMin 'Set minimum range value XYZBubblePlot.RadiusRangeMin = 1 'Get maximum range value Debug.Print "RadiusRangeMax = "; XYZBubblePlot.RadiusRangeMax 'Set maximum range value XYZBubblePlot.RadiusRangeMax = 10 'Get bubble X rotation Debug.Print "Bubble X rotation = "; XYZBubblePlot.BubbleXRot 'Set bubble X rotation to 30 degrees XYZBubblePlot.BubbleXRot = 30 'Get bubble Y rotation Debug.Print "Bubble Y rotation = "; XYZBubblePlot.BubbleYRot 'Set bubble Y rotation to 75 degrees XYZBubblePlot.BubbleYRot = 75 'Get current draw method Debug.Print "Draw method = "; XYZBubblePlot.DrawMethod 'Set draw method to wire frame 1 XYZBubblePlot.DrawMethod = grfWireFrame1 'Get wire frame fill color Debug.Print "Fill color = "; XYZBubblePlot.FillColor 'Set wire frame fill color to blue XYZBubblePlot.FillColor = grfColorBlue 'Get wire frame line color Debug.Print "Line color = "; XYZBubblePlot.lineColor 'Set wireframe line color to green XYZBubblePlot.lineColor = grfColorGreen 'Return line count Debug.Print "Line count = "; XYZBubblePlot.LineCount 'Set line count to 10 XYZBubblePlot.LineCount = 10 'Get gradient fill detail XYZBubblePlot.DrawMethod = grfGradient Debug.Print "Gradient detail = "; XYZBubblePlot.GradDetail 'Set "Gradient detail" to 50 XYZBubblePlot.GradDetail = 50 'Return size column Debug.Print "Size column = "; XYZBubblePlot.sizeCol 'Change size column XYZBubblePlot.RadiusRange = grfUseDataRange XYZBubblePlot.sizeCol = 5 'Return bubble minimum radius Debug.Print "Minimum radius = "; XYZBubblePlot.BubbleMin 'Set minimum bubble radius to 0.1 XYZBubblePlot.BubbleMin = 0.10 'Return bubble maximum radius Debug.Print "Maximum radius = "; XYZBubblePlot.BubbleMax 'Set maximum bubble radius to 0.6 XYZBubblePlot.BubbleMax = 0.6 '*************************************************** 'Auto3DBubblePlot method '*************************************************** 'Set the bubble plot gradient fill color XYZBubblePlot.LoadColorMap(GrapherApp.Path+ _ "\Color Scales\ChromaDepth.clr") End Sub