Axis Object
An Axis object is an individual axis (right, left, top, bottom, X, Y, or Z). An Axis object is a single element of an Axes collection. Axis objects are predefined by Surfer, and cannot be created or destroyed. They can be shown, hidden, or modified, however.
Derived from: Shape object (All methods and properties of Shape apply to this object.)
The following table provides the properties of the Axis object.
Property |
Description |
Returns/sets the auto scale state. |
|
Returns the axis line format object. It is a read-only property. |
|
Returns/sets the plane of the axis. |
|
Returns the axis type. It is a read-only property. |
|
Returns the axis crossing along the orthogonal axis (in map units). It is a read-only property. |
|
Returns the axis crossing along the orthogonal axis (in map units). It is a read-only property. |
|
Returns the value of the first major tick in map units. It is a read-only property. |
|
Returns/sets the label angle from the axis in degrees. |
|
Returns the label font object. It is a read-only property. |
|
Returns the label format object. It is a read-only property. |
|
Returns/sets the label offset from the axis in page units. |
|
Returns the value of the last major tick in map units. It is a read-only property. |
|
Returns the major grid line format object. It is a read-only property. |
|
Returns the interval between major ticks in map units. It is a read-only property. |
|
Returns/sets the major tick length in page units. |
|
Returns/sets the major tick type. |
|
Returns the axis maximum in map units. It is a read-only property. |
|
Returns the axis minimum in map units. It is a read-only property. |
|
Returns the minor grid line format object. It is a read-only property. |
|
Returns/sets the minor tick length in page units. |
|
Returns/sets the number of minor ticks per major tick. |
|
Returns/sets the minor tick type. |
|
Returns/sets the reverse axis state. |
|
Returns/sets the show labels state. |
|
Returns/sets the show major grid lines state. |
|
Returns/sets the show minor grid lines state. |
|
Returns/sets the axis title. |
|
Returns/sets the title angle in degrees from the axis. |
|
Returns the title font format object. It is a read-only property. |
|
Returns/sets the title offset along the axis in page units. |
|
Returns/sets the title offset perpendicular to the axis in page units. |
The following table provides the methods of the Axis object.
Method |
Description |
Sets the axis scaling. |
Example
The following script demonstrates how the Axis object is used in reference to the Axes collection.
Sub Main
'Declares SurferApp as an object
Dim SurferApp As Object
'Creates an instance of the Surfer Application object and assigns
'it to the variable named "SurferApp"
Set SurferApp = CreateObject("Surfer.Application")
'Makes Surfer visible
SurferApp.Visible = True
'Declares Plot as an object
Dim Plot As Object
'Creates a plot document in Surfer and assigns it to the variable
'named "Plot"
Set Plot = SurferApp.Documents.Add(srfDocPlot)
'Declares Shapes as an object
Dim Shapes As Object
'Assigns the Shapes collection to the variable named "Shapes"
Set Shapes = Plot.Shapes
'Declares MapFrame as an object
Dim MapFrame As Object
'Creates a map and assigns it to the variable named "MapFrame"
Set MapFrame = Shapes.AddContourMap(SurferApp.Path+"\Samples\demogrid.grd")
'Declares Axes as an object
Dim Axes As Object
'Assigns the Axes collection to the variable named "Axes"
Set Axes = MapFrame.Axes
'Declares Axis as an object
Dim Axis As Object
'Assigns the bottom X axis to the variable named "Axis"
'Instead of 1 you could use "bottom axis"
Set Axis = Axes(1)
End Sub