Replacement for the ColorScales folder in Surfer

With the release of Surfer 16, the ColorScales folder in the Surfer installation directory has been removed. One CLR file, Rainbow.clr, is copied to the Samples folder in the installation directory for your use.

If you want the older ColorScales folder, with all the additional CLR files, you can download the attached ColorScales.zip file. Just unzip the file and extract the folder to wherever you want the CLR files to be.

 

Automation

You can directly use any of the color scales contained within the Surfer colormap Presets list by calling them by name via automation. This is done using the LoadPreset method.

'Load a CLR file for the contour layer 
ContourLayer.FillForegroundColorMap.LoadPreset("Terrain")

 

If you are using a custom colormap that is not contained within the Surfer colormap Presets list, you can instead save the CLR file from the Colormap Editor to a location of your choice, then reference it by using the LoadFile method. The below example can be used where the (SurferApp.Path+"\Samples\Rainbow.clr") portion can be changed to your directory containing the desired CLR file. 

'Load a CLR file for the contour layer 
ContourLayer.FillForegroundColorMap.LoadFile(SurferApp.Path+"\Samples\Rainbow.clr")
'Applies the above fill settings to the layer
ContourLayer.ApplyFillToLevels(1, 1, 0)

 

Updated December 2021

Was this article helpful?
26 out of 31 found this helpful

Comments

0 comments

Please sign in to leave a comment.