Re: IDL 8.1 Colorbar Weirdness Continues... [message #77693 is a reply to message #77691] |
Sat, 17 September 2011 10:00  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
David Fanning writes:
> I am trying to write an article about how the IDL 8.1
> Colorbar() function actually works. This is becoming
> *extremely* difficult!
Oh, my gosh! The situation is even worse than I thought!
Look at this.
IDL> img = Read_Image(file)
IDL> img = Scale_Vector(img, 80, 200)
IDL> help, img
IMG FLOAT = Array[250, 250]
IDL> imgObj = Image(img, Position=[0.1, 0.1, 0.9, 0.8])
IDL> cb = Colorbar(Target=imgObj,Position=[0.1, 0.85, 0.9, 0.88])
IDL> maxmin, img
% Compiled module: MAXMIN.
MaxMin: 200.000 80.0000
IDL> img = Byte(img)
IDL> maxmin, img
MaxMin: 200 80
IDL> imgObj = Image(img, Position=[0.1, 0.1, 0.9, 0.8])
IDL> cb = Colorbar(Target=imgObj,Position=[0.1, 0.85, 0.9, 0.88])
You can see that by attaching the color bar to the image,
that the image is actually scaled to the values in the
color bar. I suppose, given this color bar design, that
this is what you would want to happen.
But, what this means is that Mark Piper's method of
"correcting" the color bars labels by using the
TICKNAME keyword is *never* going to work. In fact,
it will ALWAYS result in some colors of the image
being represented incorrectly. You won't be able
to believe ANYTHING you see!
This is a serious, serious deficiency in this
Colorbar() function! And I suspect, although I
can't prove it yet, that this goes all the way
down into the Image() function as well.
My God, I would not be using function graphics to
do important science!
Cheers,
David
P.S. I hope I am wrong about all this, but I don't
see any evidence at the moment that I am. :-(
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|