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

Home » Public Forums » archive » Re: Colormap in idl -vm
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: Colormap in idl -vm [message #38678] Wed, 24 March 2004 06:33 Go to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
PJL writes:

> I have this same colormap problem in IDL Virtual Machine on an SGI
> running IRIX 6.5. Adding the DEVICE, DECOMPOSED=0 does not help.

Well, I'm not overly fond of using DEVICE DECOMPOSED
in code anyway. Plays havoc with what you are trying
to do, usually.

I prefer using device-independent color methods. Here is
a Virtual Machine test program that uses FSC_COLOR to
load colors. You can find FSC_COLOR here:

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

Do this:

1. Start a fresh IDL session.

2. Compile VM_TEST

IDL> .compile vm_test

3. Type RESOLVE_ALL:

IDL> Resolve_All

4. Save the routines in a save file:

IDL> Save, Filename='vm_test.sav', /Routines

5. Exit IDL.

Now run the save file in the Virtual Machine. What colors
are you seeing?

Cheers,

David

;**********************************************************
PRO VM_TEST_EVENT, event
Widget_Control, event.top, /Destroy
END

PRO VM_TEST

base = Widget_Base(Column=1)
draw = Widget_Draw(base, XSize=400, YSize=400)
button = Widget_Button(base, Value='Quit')
Widget_Control, base, /Realize

bg = FSC_Color('charcoal', !D.Table_Size-2)
ac = FSC_Color('green', !D.Table_Size-3)
dc = FSC_Color('yellow', !D.Table_Size-4)

Plot, Findgen(11), Background=bg, Color=ac, /NoData
OPlot, Findgen(11), Color=dc

XManager, 'vm_test', base

END
;**********************************************************

--
David Fanning, Ph.D.
Fanning Software Consulting
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: Colormap in idl -vm [message #38679 is a reply to message #38678] Wed, 24 March 2004 06:08 Go to previous messageGo to next message
portshome is currently offline  portshome
Messages: 10
Registered: August 2003
Junior Member
I have this same colormap problem in IDL Virtual Machine on an SGI
running IRIX 6.5. Adding the DEVICE, DECOMPOSED=0 does not help.

PJ
Re: Colormap in idl -vm [message #38682 is a reply to message #38679] Tue, 23 March 2004 15:47 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Yunxiang Zhang writes:

> It seems that 'idlde -vm' doesn't really care about my .idl_startup.pro.

No, I think this has been pretty well established, and even
documented. :-)

> And another strange thing is whenever I start the virtual machine, I have
> to click the button twice to get to the open sav file dialogue. Was it due
> to the latest patch? I can't remember. ^!^

Haven't seen this. Don't know.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: Colormap in idl -vm [message #38683 is a reply to message #38682] Tue, 23 March 2004 15:25 Go to previous messageGo to next message
Yunxiang Zhang is currently offline  Yunxiang Zhang
Messages: 19
Registered: October 2003
Junior Member
Thanks David!

It seems that 'idlde -vm' doesn't really care about my .idl_startup.pro.
And another strange thing is whenever I start the virtual machine, I have
to click the button twice to get to the open sav file dialogue. Was it due
to the latest patch? I can't remember. ^!^

Yunxiang


On Tue, 23 Mar 2004, David Fanning wrote:

> Yunxiang Zhang writes:
>
>> I was not able to make the colormap work properly with idl virtual
>> machine. The image always looks b/w and TVLCT defined color is always
>> black.
>>
>> For example, LOADCT won't do anything and the following code gives me
>> totally black screen. This happens only in virtual machine mode(Linux).
>> :(
>>
>> TVLCT, [[0], [255], [31]], green
>> PLOT, x, my_func, color=green
>>
>> Is it a common problem or I have to know some tricks here? Thanks!
>
> I guess I would have tried this:
>
> TVLCT, [[0], [255], [31]], green
> DEVICE, Decomposed=0
> PLOT, x, my_func, color=green
>
> Does that work any better?
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting
> Coyote's Guide to IDL Programming: http://www.dfanning.com/
>
Re: Colormap in idl -vm [message #38684 is a reply to message #38683] Tue, 23 March 2004 14:16 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Yunxiang Zhang writes:

> I was not able to make the colormap work properly with idl virtual
> machine. The image always looks b/w and TVLCT defined color is always
> black.
>
> For example, LOADCT won't do anything and the following code gives me
> totally black screen. This happens only in virtual machine mode(Linux).
> :(
>
> TVLCT, [[0], [255], [31]], green
> PLOT, x, my_func, color=green
>
> Is it a common problem or I have to know some tricks here? Thanks!

I guess I would have tried this:

TVLCT, [[0], [255], [31]], green
DEVICE, Decomposed=0
PLOT, x, my_func, color=green

Does that work any better?

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: Colormap in idl -vm [message #38775 is a reply to message #38678] Tue, 30 March 2004 07:05 Go to previous message
portshome is currently offline  portshome
Messages: 10
Registered: August 2003
Junior Member
Actually I applied IDL patch v6.03, and it fixed my problem! I don't
know but it may fix the other person's problem as well.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: changing button text for dialog_message
Next Topic: widget objects

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

Current Time: Wed Oct 08 20:01:00 PDT 2025

Total time taken to generate the page: 0.09053 seconds