Industrial Data Science
in C# and .NET:
Simple. Fast. Reliable.
 
 

ILNumerics - Technical Computing

Modern High Performance Tools for Technical

Computing and Visualization in Industry and Science

tgt

Controlling Contour Level Number and Values

Manual control over how many levels are created is possible by defining the needed number of predefined level parameters and specifying a number for the Value property for all of them. Note that if any Value was not defined explicitly, the number of levels gets automatically determined still! Predefined levels serve as template for automatically generated ones then (see above). All predefined Values will take precedence over the automatically generated ones.

The next example configures all levels manually. It selects interesting level values and chooses individual color values into the colormap. Labels are switched off for all but the first and the last level. Since we do specify the levels Value for all levels explicitly, no automatic levels are added. We only get as many levels as defined.

This time, no automatic levels have been created. Furthermore, because we manually determined the color values for the levels, there is no deterministic continuous mapping from the data values to the colors anymore. Hence, the color bar is not shown - even if it was added to the plot.