Axes Collection

The Axes collection contains all axes for the map frame or variogram. There are four axes (right, left, top, and bottom) for most maps and five (right, left, top, bottom, and Z) for 3D wireframes and 3D surfaces. Variograms contain two axes (X and Y). The individual members of the Axes collection are contained in the Axis object.

The following table provides the properties of the Axes collection:

Property

Description

Application

Returns the application object. Its a read-only property

Count

Returns the number of axes. Its a read-only property.

Parent

Returns the parent object. Its a read-only property.

The following table provides the methods of the Axes collection:

Method

Description

Item*

Returns an individual axis.

*default method

Example 1

The following script demonstrates how the Axes object is used in reference to the MapFrame object.

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

 

End Sub

Example 2

The following script demonstrates how the Axes object is used in reference to the Variogram object.

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 Variogram as an object

 Dim Variogram As Object

 

'Creates a variogram and assigns it to the variable named

'"Variogram"

Set Variogram = Shapes.AddVariogram(SurferApp.Path+"\Samples\demogrid.dat")

 

'Declares Axes as an object

 Dim Axes As Object

 

'Assigns the Axes collection to the variable named "Axes"

 Set Axes = Variogram.Axes

 

End Sub