AutoPlotLabels Object

The AutoPlotLabels object controls plot label settings and is accessed from a plot’s Labels property.

Properties

Angle

Application

AutoFirstLabelRow

AutoLastLabelRow

FirstLabelRow

Font

Format

HAlign

LabelAlongLine

LabelPos

LabelsCol

LabelsInYCol

LastLabelRow

Line

OffsetAlongLine

Parent

ShowLabels

Step

VAlign

XOffset

YOffset

ZAlign

Methods

ResetPositions

Remarks

Note that the AutoBoxPlot object's Labels command only calls the Line property and ResetPositions method.

Example

This example shows how to reference the plot labels of a line/scatter plot.

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")

 

 '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 LineGraph as an object

  Dim LineGraph As Object

 

 'Creates a graph and assigns it to the

 'variable named "LineGraph"

  Set LineGraph = Shapes.AddLinePlotGraph(GrapherApp.Path+\samples\bar chart orientations.dat)

 

 'Declare LinePlot as an object

  Dim LinePlot As Object

 

 'Set LinePlot to the first line plot on

 'the LineGraph graph

  Set LinePlot = LineGraph.Plots.Item(1)

 

 'Declares PlotLabels as Object

  Dim PlotLabels As Object

 

 'Adds plot labels

  LinePlot.Labels.ShowLabels = True

 

 'Assigns the labels to the variable

 'named "PlotLabels"

  Set PlotLabels = LinePlot.Labels

 

End Sub

See Also

Plot Labels

Hi-Low-Close Plot Labels

Ternary Plot Labels