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

Home » Public Forums » archive » Re: How to make the figure change automatically while I selected a new color table?
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
Re: How to make the figure change automatically while I selected a new color table? [message #61037] Thu, 26 June 2008 20:25
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> Now, when you can the color table...

Huh!? Should be, "when you LOAD the color table..."

Sheesh!

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.")
Re: How to make the figure change automatically while I selected a new color table? [message #61039 is a reply to message #61037] Thu, 26 June 2008 20:21 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
duxiyu@gmail.com writes:

> I have a problem about using the color table.
>
> For example,
>
> device, decomposed=0
> loadct, 0
> tvscl, dist(256)
> xloadct
>
> While I changing the color table in the dialog box 'XLoadct', I hope
> the color of the figure can change automatically.
> Some files said that when IDL run in the pseudocolor mode (8-bit
> mode), the figure can change automatically.
> But my system is Windows, I have search in the help and do not find
> how to change the the visual moed to pseudocolor.
> The keyword 'PSEUDO_COLOR' can only be used in 'X-window' system.

Here is how to do this on a 24-bit display. This comes from the
header information in XCOLORS:

http://www.dfanning.com/programs/xcolors.pro

Write a small routine line this:

PRO REFRESH_IMAGE, Image=image, _Extra=extra, WID=wid
IF N_Elements(wid) NE 0 THEN WSet, wid
TVIMAGE, image, _Extra=extra
END

Invoke the routine like this:

IDL> Window, /Free
IDL> TVImage, image, Position=[0.2, 0.2, 0.8, 0.8]
IDL> XColors, NotifyPro='Refresh_Image', Image=image, WID=!D.Window

Now, when you can the color table, the image will be automatically
updated in the window.

There are similar, if slightly less flexible, mechanisms
available for XLOADCT.

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.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: The problem about the '.RESET_SESSION' command
Next Topic: Re: The problem about the '.RESET_SESSION' command

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

Current Time: Sat Oct 11 05:44:34 PDT 2025

Total time taken to generate the page: 0.96161 seconds