ColorSpectrum Object

 

The ColorSpectrum object defines a correlation between a range of data and a spectrum of colors for hatch maps, prism maps, vector maps, and gradient maps.

 

Properties

Application

Name

NodeColors

NodePositions

Parent

 

Methods

LoadFile

LoadFromList

SaveFile

SetNodes

SetNodes2

 

Example

This example references the ColorSpectrum object in a prism map.

 

Sub main

'Creates an instance of the MapViewer Application object

'and assigns it to the variable named "mvApp"

 Set mvApp = CreateObject("MapViewer.Application")

 

'Makes the application main window visible

 mvApp.Visible = True

 

'Assigns the location of the samples folder

'to the variable "InPath"

 InPath$ = mvApp.ApplicationFolder + " samples\"

 

'Creates a map document object, and assigns

'it to the variable named "Plot"

 Set Plot = mvApp.Documents.Add(DocType:=mvDocPlot)

 

'Creates a prism map object and assigns

'it to the variable named "PrismMap"

 Set PrismMap = Plot.CreatePrismMap( BoundaryFileName:=InPath$ + _

 "co2010.gsb", DataFileName:=InPath$ + "co2010.dat", _

 ColorMethod:=mvPrismColorInterpolated, PIDCol:=1, VarCol:=5)

 

'Assigns the height ColorSpectrum object to the

'variable named "Color Spectrum"

 Set ColorSpectrum = PrismMap.HeightColorSpectrum

End sub