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

Home » Public Forums » archive » Re: IDL 8.1 Colorbar Weirdness Continues...
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: IDL 8.1 Colorbar Weirdness Continues... [message #77693 is a reply to message #77691] Sat, 17 September 2011 10:00 Go to previous message
David Fanning is currently offline  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.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL 8.1 Colorbar Weirdness Continues...
Next Topic: Left Matrix Division

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

Current Time: Fri Oct 10 22:36:05 PDT 2025

Total time taken to generate the page: 0.80348 seconds