comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: fun with nonlinearity and COLORBAR
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: fun with nonlinearity and COLORBAR [message #72962] Thu, 21 October 2010 12:35 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Jeremy Bailin writes:

> I'm looking for advice on a plot I'm making that uses David's COLORBAR
> routine. The problem is that the mapping between color index in the
> image and data value is quite non-linear - and not a simple
> transformation, either (it's generated via histogram equalization).
>
> There are a few ways I can imagine having it look. So first, from an
> aesthetics (and ease-of-understanding) standpoint, which would be
> best?
> 1. The colorbar has one line for each color index, and is annotated
> using 6 evenly-spaced divisions, but the numbers marking those
> divisions are not evenly distributed.
> 2. The colorbar has one line for each color index, the annotations
> are evenly spaced in *value*, but are spaced unevenly along the color
> bar.
> 3. The colorbar is annotated using 6 evenly-spaced divisions that
> have evenly-spaced numbers, and the colors within the color bar vary
> (i.e. the mapping between row up the color bar and color index is no
> longer linear).
>
> The second question is implementation. I can achieve #1 very easily
> using COLORBAR. I think that in order to do #2, I would need to
> essentially roll my own version of COLORBAR that changes the
> annotation locations - are there any shortcuts that would let me use
> the existing routine? To do #3, my best idea is to regenerate a new
> (non-linearly altered) color table, and then use the existing COLORBAR
> routine. Any caveats with that, or any easier ways to do it?
>
> Alternatively, what other ideas do people have for conveying this kind
> of information?

If you are talking about six discrete colors, I would use
the discrete color bar, DCBAR.

I have implemented something like number 1, equally spaced
divisions, with non-linear values, using FSC_Colorbar (new
name!) in this article:

http://www.dfanning.com/map_tips/precipmap.html

I had to use a tick formatting function to do it correctly.

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Previous Topic: Re: Get Lat/long equivalent based on NEASE grid value
Next Topic: Chance to Become Famous in IDL Circles!

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 05:19:55 PDT 2025

Total time taken to generate the page: 0.39879 seconds