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

Home » Public Forums » archive » colorbar to display the 0 in the middle
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: colorbar to display the 0 in the middle [message #47487 is a reply to message #47399] Fri, 10 February 2006 03:12 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Vigeesh Nambiar writes:

> But, I want something like this
> minval = -30
> maxval = +50
>
> i.e my colorbar should look something like this
> ______ 50
> | |
> | |
> | |
> | |
> | |
> | |
> | |- 0
> | |
> | |
> | |
> | |
> | |
> | |
> ------- -30
>
> :-)
>
> Basically, what I want is that the color for the data value 0 should be
> the same for all the output images. That is, if I use a Blue-Red color
> table, then the 0 data value should always be green. The main problem
> is because the minimum and maximum value keeps on changing for
> different arrays. If for the first array the min value is -30 and max
> is 50, for the second array it might be -50 and +75, and so on.

Are you SURE that is what you want? Differential scaling on the positive
and negative sides of your data, and differential scaling on all data
sets!? Wouldn't you want to *compare* the data at some point?

I don't know. It's your data analysis. But this is simply a mapping
problem. Scale negative values into 100 values. Scale positive values
into 100 values. Use a color table that has 200 values. Label it with
YTICKV (since the scale is no longer linear). Just don't include my
name in the acknowledgements, please. :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: idl workbench: not working properly (plot, buttons and console)
Next Topic: Re: How to change ENVI tmp folder in IDL

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

Current Time: Sun Oct 12 07:19:48 PDT 2025

Total time taken to generate the page: 1.04123 seconds