Is it possible to have my own customised colour scale in CFX-Post? I
would like to use a scale that runs from dark blue (-X) to white (0) to
dark red (+X), but it is not available by default in CFX Post.
For contour plots, there are already several options for colour maps. The default is Rainbow, with other options such as Greyscale, Blue to White, etc...
These are defined in a file called CFXColourMaps.ccl in your installation, in the subdirectory 'etc'.
I have attached a modification to this file, adding a colour map called 'Blue to Red' at the end.
If you want this to be available next time you start Post, you will have to set an environment variable CFX_COLOUR_MAP_FILE=<filename>.
On unix this is done with
setenv CFX_COLOUR_MAP_FILE <full path to your modified CFXColourMaps.ccl>
On windows, go to Start/Control Panel/System/Advanced/Environment Variables and define a new user variable, an assign it to the full path to your modified colourmap file.
After this, you can start Post, and this colour map will be read in, and the new 'Blue to Red' option will be available.
To define new coulour maps:
First start out by defining the COLOUR MAP: object and its name. <name> is what appears in Post in the Colour Map selection menu:
Then enter the map itself. The list accepted is a group of four entries. The first entry is the normalized variable value (zero to 1). The second, third, and fourth values are the R,G,B values.
Map = 0, 0, 0, 0, 1, 1, 1, 1
means that at the minimum value (0), black is used (0,0,0). At the maximum value, white is used. You may find it handy to add linebreaks to separate your entries. If this is the case, use a back-slash to escape the newline character:
Map = 0, 0, 0, 0,
1, 1, 1, 1
Finally, use END to terminate the object. You can smoothly interpolate between different colours.
The new scale (called Blue to Red) which goes from Blue to White to Red is actually defined with:
COLOUR MAP:Blue to Red
Map = 0, 0, 0, 1,
0.5, 1, 1, 1,
1, 1, 0, 0
The above is relevant for CFX-Post, version 11.
In version 12, the user will beable to define a new colourmap interactively in Post.
The newly defined colourmap can be saved for future use (by ticking 'Make available for other cases'), and can even be saved as the default colour map.