[Thread Prev][Thread Next][Index]

Re: Custom Ferret Palette?

Hi Mark,

[aside: You'll probably hit a broader audience for this question from the
ferret_users mailing list ...]

The short answer to your question is that Ferret will refuse to display more
that 250 color "contour levels" on a plot. It reserves the other colors for
lines and annotations.

As is typical with Ferret it is very quick to "ask" the program for the
answer you want.  Try for example

    yes? shade/lev=240 i[i=1:100]+j[j=1:100]

The relationship between palettes and the colors produced depends upon the
type of palette: RGB_Mapping "Percent","By_value", "By_level". You'll find
discussions of creating palettes in the Ferret Users Guide
(Click on palette in the index or table of contents under Chapter 6:
Customizing Plots/Colors/Shade and Fill colors)

If you are trying to use a fixed palette of (say) 250 colors then you'll
probably be using a "By_level" palette with 250 entries and you'll want to
specify /LEVELS=250 on the graphics command, indicating that all 250 colors
should be used.  By default, Ferret chooses somewhere around 20 levels (with
"nice" numerical values) and would then use only that many colors.

I hope this helps.  Please send your offending palette of 256 colors to
Ansley (cc above), so we can look into improving the error messages.

    - steve


Mark A Ohrenschall wrote:

> How do I make a custom palette in LAS/Ferret?
> I found what seems to be the standard palettes in /usr/local/ferret/ppl
> and I naively copied one (e.g., yellow.spk) to another (e.g.,
> land_256.spk) and then defined a ferret property in my LAS configuration
> file to use land_256 for a particular variable.
> However, when I tried that I got an internal server error, and
> GenericLAS_debug.txt has a bunch of lines that say "gsetcolourrep()   96
> Colour is outside range [0,1]". In fact, even when I refer to a
> non-existent palette I get the same results.
> Incidentally, I'm calling the palette land_256 because I'd like to
> display an image in 256 colors. I'm using fill_levels to indicate that I
> want 256 colors, but I got an error saying that fill_levels cannot be
> set greater than 250. Am I using the wrong ferret property, or can
> ferret really not display more than 250 colors?
> Thanks,
> Mark

Steve Hankin
NOAA/PMEL, 7600 Sand Point Way NE, Seattle, WA 98115-0070
ph. (206) 526-6080 -- FAX (206) 526-6744

[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement