Re: Teaching an Elephant to Dance [message #77581 is a reply to message #77580] |
Mon, 12 September 2011 11:18   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Mark Piper writes:
> cb = colorbar(target=c, $
> tickname=string(levels, format='(f4.2)'), $ ; use the levels
> position=[0.1, 0.90, 0.9, 0.95])
Even though I can't run this code because of the TICKNAME
keyword that crashes my machine, I can see that this is
only a cosmetic fix, not a real fix. The color bar
is actually showing data that runs from 0.0134 to
0.9847, and it is dividing that range into four divisions.
But, the divisions do not fall where we need them to fall.
The divisions are marked at 0.2563, 0.4991, and 0.7419.
This is so even if you *label* them 0.25, 0.50, and 0.75!
If we weren't so lucky with our actual data range, we
would see BIG differences in how the tick marks on the
color bar and the colors themselves line up.
Run this program with data defined like this, and you
will see what I mean:
data = 0.125 > Randomu(-3L,9,9) < 0.875
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.")
|
|
|