| |
- loadct(*in_args, **in_kwds)
- Load a predefined color table.
This procedure loads a color table into a VCS canvas that is
passed in as an argument. This is different from IDL where the
color table is loaded into the IDL system memory.
Positional Argument(s):
* *in_args[0]: VCS canvas object for which to set the color map
for. Altered by procedure.
* *in_args[1]: Index of the color map to set as the active color
map for the VCS canvas. Scalar integer. The following values
are accepted:
0: Black-white linear.
1: Blue-white linear: Dark blue to white.
11: Blue-red 1: Dark to light blue, then light to dark red;
blue is color indices 16-127, red is 128-239.
13: Rainbow (violet to red, 390-680 nm).
43: Red-white linear: Dark red to white.
53: Rainbow (red to violet, 680-390 nm).
99: CDAT default color map.
Keyword Argument (from **in_kwds):
* verbose: If 1, information messages are printed to stdout. If
0, all informational messages are suppressed. Default is 1.
The description of the above colormaps applies to color indices
16 to 239, inclusive. If *in_args is no argument, this procedure
prints out the list of available color maps and their index values.
Pictures of some of these color maps are at:
http://www.johnny-lin.com/cdat_tips/tips_color/new_cm.html.
http://www.johnny-lin.com/cdat_tips/tips_color/predef_cm.html
Output:
* Argument *in_args[0] is changed and returned, with the color map
specified by *in_args[1] as the active color map. The map is
named the string specified by variable loadct_cmap_name.
Syntax of method call is based on IDL conventions. However, values
are set to my personal preferences.
Examples:
(1) Importing:
from IaGraph.loadct import loadct
(2) Prints available color tables:
loadct()
(3) Loads black-white linear as the active color map in VCS canvas
v:
loadct(v, 0)
(4) Loads black-white linear as the active color map in VCS canvas
v, and informational messages are not printed:
loadct(v, 0, verbose=0)
|