ContinuousColorScale Object

The ContinuousColorScale object represents a continuous color scale legend. Continuous color scales have a gradational mapping from a minimum data value to a maximum data value, as defined by the linked map object. This object coincides with the vector map, surface, or color relief map color scale bar. Color scale bars can be shown or hidden by properties in the owning map object.

Derived from: ColorScale object (All methods and properties of ColorScale apply to this object)

The following table provides the properties of the ContinuousColorScale object:

Property

Description

FrameLine

Returns the line format object. It is a read-only property

LabelAngle

Returns/sets the label angle in degrees.

LabelFont

Returns the font format object for labels. It is a read-only property.

LabelFormat

Returns the label format object. It is a read-only property.

LabelInterval

Returns/sets the interval between labels (data units).

LabelMaximum

Returns/sets the maximum label value (data units).

LabelMinimum

Returns/sets the minimum label value (data units).

Opacity

Returns/sets the opacity.

Example 1

The following script demonstrates how the ContinuousColorScale object is used in reference to the ImageLayer 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 vector map and assigns it to the variable named

'"MapFrame"

Set MapFrame = Shapes.AddColorReliefMap(GridFileName:=SurferApp.Path+"\Samples\demogrid.grd")

 

'Declares ColorReliefLayer as an object

Dim ColorReliefLayer As Object

 

'Assigns the color relief map properties to the variable named

'"ColorReliefLayer"

Set ColorReliefLayer = MapFrame.Overlays(1)

 

'Displays the color relief map color scale

ColorReliefLayer.ShowColorScale = True

 

'Declares ContinuousColorScale as an object

Dim ContinuousColorScale As Object

 

'Assigns the color scale properties to the variable named

'"ContinuousColorScale"

Set ContinuousColorScale = ColorReliefLayer.ColorScale

 

End Sub