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

Home » Public Forums » archive » Colors with XOR plotting: How to do it
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: Colors with XOR plotting [message #472 is a reply to message #471] Fri, 17 July 1992 11:22 Go to previous messageGo to previous message
eaustin is currently offline  eaustin
Messages: 6
Registered: June 1992
Junior Member
In article <1992Jul16.112325.18856@news.larc.nasa.gov>, zawodny@arbd0.larc.nasa.gov (Dr. Joseph M Zawodny) writes:

> I have noticed for some time that a number of the questions posted here could
> be answered quite easily by post-er if they just played with IDL for 15
> minutes. After all the I in IDL is for Interactive.

More on this below.

> Specifically, your question cannot be answered without knowing what the
> background colors are. Example, if you overlay red on cyan with XOR you
> get an orange color.

This is not true. The color of the background makes absolutely no difference
when you overplot with XOR. What matters is the color index of the background,
not the color of the background.

> It is also apparent that you do not want the XOR function but simply wish
> to overwrite (temporarily but completely) some part of your image
> with red and blue. I suggest you invest some time in your manual (Appendix E).

I did invest quite a bit of time in the manual reading about the graphics
function and colors but I did not find the description of
DEVICE,SET_GRAPHICS=6
to be very enlightening. It is only after 2 days of trying things and talking
to another person here who knows more than I, that I think I understand how
the color maps and XOR work. XOR does do what I want.

> If this is true you may have to get fancy (like keeping a copy of your
> image in a pixmap and using the device,copy=[ ... ] command to restore
> portions of your image). I think you will probably settle for a highlighted
> region with no specific color, just obviously different from the underlying
> image.

I do not know exactly how pixmap and device,copy=[ ... ] work but I am
inclined to think they would be more complicated and slower than over plotting
with XOR.

I posted the question to the net in the first place because I am relatively
new to IDL and I thought someone else might already have run into this
problem and solved it. I like IDL but I often do not find the manuals
to be very helpful. This is a case where left to myself with just the
manual it would have taken me much longer to figure things out because
I had a basic misunderstanding of how the color tables work. And based
on some of the email responses I have received, I am not the only one.

Besides, this group only gets a few messages a day anyway. An occasional
"easy" question is not going bog down the net.
--
Eric J. Austin EMAIL: eaustin@ll.mit.edu
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: converting VMS idl files to UNIX pvwave
Next Topic: IDL procedure to check time and sleep job.

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

Current Time: Wed Oct 08 19:11:05 PDT 2025

Total time taken to generate the page: 0.00432 seconds