Re: colorbar to display the 0 in the middle [message #47397] |
Thu, 09 February 2006 20:01  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
vigeesh@gmail.com writes:
> I'm working on a simulation stuff, computationally speaking, its
> nothing but generating images for each instant of time.:-)
> Each image is accompanied by a colorbar( I use D.Fanning's colorbar
> program).
>
> Now my problem is......
> At each instant of time, the array that has to be displayed has a
> negative minimum value and a positive maximum value. I want my colorbar
> to display the 0 in the middle of the bar for all the time instant and
> scale the rest according to the min and max value.
> There could be a simple solution for this, please help.
How about this:
minVal = -30
maxVal = 30
Colorbar, Range=[minVal, maxVal]
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|
Re: colorbar to display the 0 in the middle [message #47490 is a reply to message #47397] |
Thu, 09 February 2006 21:51  |
vigeesh
Messages: 5 Registered: February 2006
|
Junior Member |
|
|
David Fanning wrote:
> How about this:
>
> minVal = -30
> maxVal = 30
> Colorbar, Range=[minVal, maxVal]
>
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.
Thanks,
Vigeesh.
|
|
|