Re: [idvdevelopers] trying to contour fill bathy according to known levels and color table

Hi Stuart-

I'm moving this to idvdevelopers instead of idvusers since it's
more of a programmers question.

Stuart Maclean wrote:
Hi Don, thanks for the prompt reply (as always)..

I do not quite follow your suggestion:

At present, the only solution would be to generate a linear
table with enough levels to create the linear scale.



How do I make the 'linear table'?

For this table, it looks like the smallest increment is 5, so
I would create a table of [3][1000] and then loop through the
14 colors, replicating them as appropriate:

  for (0 to 9): color A (0 to -10)
  for (10 to 24): color B (-11 to -25)
  for (25 to 50): color C (-26 to 50)
  etc.

Also, how did you assert that the color table in the graphic is a 'linear table'? And what does that mean exactly?

Sorry, the IDV uses linear colors.  The lookup is  based on
the range for color (range of the RGB scalar map).

Could you also explain the intended use of the Contour2DGridDisplayable's

setColorPalette

and

setContourLevels

Set contour levels sets the lines that get contoured.  setColorPalette
defines the color table.  setRangeForColor defines the linear
range used to lookup colors in the palette.

Don
*************************************************************
Don Murray                               UCAR Unidata Program
dmurray@xxxxxxxxxxxxxxxx                        P.O. Box 3000
(303) 497-8628                              Boulder, CO 80307
http://www.unidata.ucar.edu/staff/donm
*************************************************************



  • 2008 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the idvdevelopers archives: