Follow

How can I set the data to color mapping for the colormap in a Surfer script?

To set the data to color mapping (as seen in the Colormap dialog) via a script, use the .SetDataLimits parameter of the ColorMap object. This allows you to set the min/max data limits for the contour fill colors through the .FillForegroundColorMap property of the ContourMap object.

 

For example:

ContourLayer.LevelMethod = SrfConLevelMethodLogarithmic
ContourLayer.SetLogarithmicLevels(Min:=0.25, Max:=5, LevelsInDecade:=43)
ContourLayer.FillContours = True
ContourLayer.FillForegroundColorMap.LoadPreset("Rainbow")
ContourLayer.ShowColorScale=True
ContourLayer.FillForegroundColorMap.SetDataLimits(0.25, 5)

 

Updated October 9, 2017

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.