AutoBreakAxis Object
The AutoBreakAxis object is used to break axes. See the Axis Properties - Break Axis Page help topic for more information.
Important Note: Because of significant enhancements to this feature, some plots made in versions prior to Grapher 20 may not retain all prior functionality. For example, if you have a project that used Before tick spacing and Before tick division, these settings will no longer function in Grapher 20, because the tick before a break will take its properties from the parent axis. You can recreate the axis breaks using the new and enhanced features described here and in Axis Properties - Break Axis Page.
Properties
Methods
GetMinorTickDivisionAfterBreak
IsAutoMinorTickDivisionAfterBreak
SetAutoMinorTickDivisionAfterBreak
Example
The following script demonstrates how the AutoBreakAxis object is used.
Sub Main
'Create Grapher as an Object
Dim Grapher As Object
'Start Grapher
Set Grapher = CreateObject("Grapher.Application")
Grapher.Visible = True
'Open an existing document
Set Barswithmultibreaksgpj = Grapher.Documents.Open("D:\Temp\Bars with multibreaks.gpj")
'Define object pointer
Set Graph1 = Barswithmultibreaksgpj.Shapes.Item(1)
'Define object pointer
Set XAxis1 = Graph1.Axes.Item(1)
'Select object
XAxis1.Select
'Call AxisBreak.RemoveBreak(3)
XAxis1.AxisBreak.RemoveBreak(3)
'Call AxisBreak.AddBreak(2)
Var1 = XAxis1.AxisBreak.AddBreak(2)
'Call AxisBreak.RemoveBreak(3)
XAxis1.AxisBreak.RemoveBreak(Var1)
'Call AxisBreak.AddBreak(2)
Var2 = XAxis1.AxisBreak.AddBreak(2)
'Set AxisBreak.FixedScale
XAxis1.AxisBreak.FixedScale = False
'Call AxisBreak.SetBreakPosition(3, 79.4071)
XAxis1.AxisBreak.SetBreakPosition(3, 79.4071)
'Call AxisBreak.SetBreakPosition(3, 60)
XAxis1.AxisBreak.SetBreakPosition(3, 60)
'Call AxisBreak.SetBreakFrom(3, 38)
XAxis1.AxisBreak.SetBreakFrom(3, 38)
'Call AxisBreak.SetBreakTo(3, 45)
XAxis1.AxisBreak.SetBreakTo(3, 45)
'Set AxisBreak.FixedScale
XAxis1.AxisBreak.AutoBreakPosition = True
'Call AxisBreak.SetScaleTypeAfterBreak(3, grfAxisLog)
XAxis1.AxisBreak.SetScaleTypeAfterBreak(3, grfAxisLog)
'Call AxisBreak.SetScaleTypeAfterBreak(3, grfAxisDefault)
XAxis1.AxisBreak.SetScaleTypeAfterBreak(3, grfAxisDefault)
'Call AxisBreak.SetAutoTickSpacingAfterBreak(2, false)
XAxis1.AxisBreak.SetAutoTickSpacingAfterBreak(2, False)
'Call AxisBreak.SetTickSpacingAfterBreak(2, 5)
XAxis1.AxisBreak.SetTickSpacingAfterBreak(2, 5)
'Call AxisBreak.SetAutoTickSpacingAfterBreak(1, false)
XAxis1.AxisBreak.SetAutoTickSpacingAfterBreak(1, False)
'Call AxisBreak.SetTickSpacingAfterBreak(1, 5)
XAxis1.AxisBreak.SetTickSpacingAfterBreak(1, 5)
'Set TickLabels.MinorOn
XAxis1.TickLabels.MinorOn = True
'Set TickLabels.MajorSide
XAxis1.TickLabels.MajorSide = grfTicksTopRight
'Call AxisBreak.SetAutoMinorTickDivisionAfterBreak(2, false)
XAxis1.AxisBreak.SetAutoMinorTickDivisionAfterBreak(2, False)
'Call AxisBreak.SetMinorTickDivisionAfterBreak(2, 5)
XAxis1.AxisBreak.SetMinorTickDivisionAfterBreak(2, 5)
'Call AxisBreak.SetAutoMinorTickDivisionAfterBreak(2, false)
XAxis1.AxisBreak.SetAutoMinorTickDivisionAfterBreak(2, False)
'Call AxisBreak.SetMinorTickDivisionAfterBreak(2, 1)
XAxis1.AxisBreak.SetMinorTickDivisionAfterBreak(2, 1)
End Sub