AutoScaleTitle Object
The AutoScaleTitle object controls the color scale title settings and it is accessed from AutoColorScale object Title property.
Properties
Example
This example shows how to add a graph title to the existing graph.
Sub Main
'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")
'Make Grapher visible
GrapherApp.Visible = True
'Declare Docs, Plot, Shapes, Graph1, and ContourDataXYMap as Object
Dim Docs, Plot, Shapes, Graph1 ContourDataXYMap As Object
'Assigns the Documents collection to
'the variable named "Docs"
Set Docs = GrapherApp.Documents
'Creates a new plot window and assigns it
'to the variable named "Plot"
Set Plot = Docs.Add(grfPlotDoc)
'Assigns the AutoShapes collection to
'the variable named "Shapes"
Set Shapes = Plot.Shapes
'Adds a contour XY data map and assigns
'it to the variable named "Graph1"
Set Graph1 = Shapes.AddContourDataMapGraph(GrapherApp.Path + "\samples\surface data map.dat")
'Assign the contour XY data map to
'the variable named "ContourDataXYMap"
Set ContourDataXYMap = Graph1.Plots.Item(1)
'Fills the contours
ContourDataXYMap.FillContours = True
'Turn on color scale display
ContourDataXYMap.ShowColorScale = True
'Assigns the ColorScale variable to
'the color scale
Dim ColorScale as Object
Set ColorScale = Graph1.ColorScale
'Add a color scale title and assign it
'the variable ColorScaleTitle
Dim ColorScaleTitle as Object
Set ColorScaleTitle = ColorScale.Title
'Set the text for the color scale title
ColorScaleTitle.Text = "My Graph"
End Sub