|
|
|
|
|
|
|
|
|
|
Yorick
3.2.4: paletteThe plf, pli, and plfp commands require a color scale or palette, which is a continuum of colors to represent the continuous values of a variable. Actually, a palette consists of a finite number of (red, green, blue) triples, which represent a color for each of a finite list of values. A Yorick palette can never have more than 256 colors, so that a type char variable (one byte per item) can hold any index into a palette. Because many screens can display only 256 colors simultaneously, however, you shouldn't have more than about 200 colors in a palette; that is the size of all of Yorick's predefined palettes.
The palette command allows you to change palettes. The Yorick
distribution comes with predefined palettes called `
These palettes tend to start with dark colors and progress toward
lighter colors. The exceptions are ` Instead of a file name, you may pass palette three arrays of numbers ranging from 0 to 255, which are relative intensities of red, green, and blue. For example,
produces the same palette as ` Yorick internally uses the bytscl function to map the z values in a plf, pli, or plfp command into a (0-origin) index into the palette. Occasionally, as here, you will also want to call bytscl explicitly.
The predefined palette files are in the directory Y_SITE+"gist";
you should be able to figure out their format easily if you want to
produce your own. If you create a directory ` You can use the query= keyword to retrieve the RGB values for the currently installed palette:
There is also a private= keyword to palette, which you should investigate if you are interested in color table animation, or if other programs steal all your colors. LLNL Disclaimers |