How can I set the data limits and scaling 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.SetDataLimits(0.25, 5)


Updated November 12, 2018

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


Please sign in to leave a comment.