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

Home » Public Forums » archive » Strange UserSym Color Bug
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Strange UserSym Color Bug [message #80527] Wed, 20 June 2012 21:42
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Folks,

I ran into the strangest bug I have ever seen in IDL today.
It involved the USERSYM procedure by way of SymCat in the
Coyote Library. I have found no way to reproduce this bug,
except by running the widget program I was working on,
which reproduced the bug every time. (The widget program
is a strange combination of widget objects, etc., so I have
little hope that this bug will be fixed in my lifetime.)

Anyway, here is what happened. I drew a line on top of
an image. In another part of the program entirely, and in
another object, I drew a plot. Every time I would draw the
plot, it would be drawn in the color in which I had
drawn the line! I confirmed that the object was working
correctly. I was working at all times in decomposed color,
so no colors were ever loaded in the color table. The color
inputs to ALL programs, including into USERSYM itself, were
correct. But, it would draw in the wrong color!!

I confirmed and re-confirmed all color inputs, the fact
that I wasn't loading colors in the color table, etc.
Finally, I discovered that if I called USERSYM with no
color keyword set, it would "unstick" the color, and then
I could call USERSYM normally.

I seriously doubt that anyone is going to run across this
bug. But, if you do, I have an updated version of SYMCAT
in the Coyote Library that fixes the problem for me. :-)

The actual lines causing the problem looked something
like this:

thisColor = cgColor('dodger blue')
OPlot, dep, indep, Color=thisColor, PSYM=SymCat(12, Color=thisColor)

This was not a cgWindow problem. All normal draw widgets
and normal IDL direct graphics commands.

Cheers,

David

--
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.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Help with code for hyperspectral image analysis
Next Topic: Create multiple hdf files

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

Current Time: Wed Oct 08 15:10:02 PDT 2025

Total time taken to generate the page: 0.00612 seconds