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

Home » Public Forums » archive » Re: All I get is gray scale
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: All I get is gray scale [message #29074] Fri, 01 February 2002 02:13
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
David Fanning <david@dfanning.com> writes:
> Gary Hodges (gary.hodgesREMOVE@cires.colorado.edu) writes:
>
>> IDL is an amazing language in that it has such
>> great power at making a person feel so stupid.
>
> Oh, you get used to it. :-)

The power, the power, right? :-)

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
Re: All I get is gray scale [message #29079 is a reply to message #29074] Thu, 31 January 2002 16:35 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Gary Hodges (gary.hodgesREMOVE@cires.colorado.edu) writes:

> IDL is an amazing language in that it has such
> great power at making a person feel so stupid.

Oh, you get used to it. :-)

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: All I get is gray scale [message #29080 is a reply to message #29079] Thu, 31 January 2002 15:56 Go to previous message
gary.hodgesREMOVE is currently offline  gary.hodgesREMOVE
Messages: 9
Registered: October 2001
Junior Member
David Fanning <david@dfanning.com> wrote:

: Yes, something is not right. I'd slip a

: DEVICE, TRUE_COLOR=24

: into an IDL start-up file. I don't think you
: want a Direct Color visual. :-(

: Be sure you issue this command *before* you open
: any graphics windows in the IDL session. That is
: why a startup file is best.

As suggested, I created a startup file with the TRUE_COLOR setting and
everything works fine now. IDL is an amazing language in that it has such
great power at making a person feel so stupid.

Thanks,
Gary
Re: All I get is gray scale [message #29082 is a reply to message #29080] Thu, 31 January 2002 15:29 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Gary Hodges (gary.hodgesREMOVE@cires.colorado.edu) writes:

> IDL> help, /Device
> Available Graphics Devices: CGM HP LJ NULL PCL PRINTER PS REGIS TEK X Z
> Current graphics device: X
> Server: X11.0, The XFree86 Project, Inc, Release 40100000
> Display Depth, Size: 24 bits, (1600,1200)
> Visual Class: DirectColor (5)

Yes, something is not right. I'd slip a

DEVICE, TRUE_COLOR=24

into an IDL start-up file. I don't think you
want a Direct Color visual. :-(

Be sure you issue this command *before* you open
any graphics windows in the IDL session. That is
why a startup file is best.

Cheers,

David
--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: All I get is gray scale [message #29084 is a reply to message #29082] Thu, 31 January 2002 14:57 Go to previous message
gary.hodgesREMOVE is currently offline  gary.hodgesREMOVE
Messages: 9
Registered: October 2001
Junior Member
David Fanning <david@dfanning.com> wrote:
: Gary Hodges(gary.hodgesREMOVE@cires.colorado.edu) writes:

:> I've read through several historical "color" threads and even bought the book
:> (IDL Programming Techniques), but I'm still only able to plot gray scale.
:> I've just followed the "Drawing Line Plots in Color" on page 25 of the
:> Fanning book without success. The exact commands are (time and curve
:> are already defined):
:>
:> IDL> TVLCT, [70,255,0], [70,255,255], [70,0,0], 1
:> IDL> Plot, time, curve, Color=2, Background=1
:>
:> This produces a black plot window. To see anything I have to increase the
:> color value to ~50, with higher values producing progressively less gray
:> plots. I gather this goes against what I'm trying to do with the above TVLCT
:> command, which is I understand things, to assign three RGB colors to indexes
:> 1, 2 and 3.
:>
:> I have also tried "IDL> Device, Decomposed=0" trick without success.

: Humm. I find this hard to believe. :-)

Me too!

: Did you try this *before* the two commands above?
: I presume you did.

Sure. I started with "Creating Line Plots" on page 20 even though I have a
pretty good handle on that. I generated Figure 1, then skipped over to
"Creating Your Own Plot Symbols." When the plot symbols didn't come out in
color, I went to the next section to try and get my line to plot in color.

: Try this. Start IDL, open a window (use the Window command),
: the send us the contents of a Help, /Device command.
: Something is not right in Denmark.

IDL> help, /Device
Available Graphics Devices: CGM HP LJ NULL PCL PRINTER PS REGIS TEK X Z
Current graphics device: X
Server: X11.0, The XFree86 Project, Inc, Release 40100000
Display Depth, Size: 24 bits, (1600,1200)
Visual Class: DirectColor (5)
Bits Per RGB: 8 (8/8/8)
Physical Color Map Entries (Used / Total): 256 / 256
Colormap: Private, 16777216 colors. Translation table: Bypassed
Graphics pixels: Combined, Dither Method: Ordered
Write Mask: 16777215 (decimal) ffffff (hex)
Graphics Function: 3 (copy)
Current Font: <default>, Current TrueType Font: <default>
Default Backing Store: Req from Server.
Window Status: ---------------------
id typ( x, y, backing store) id typ( x, y, backing store)
0: Win( 640, 512, Req from Server)


:> Curiously, if I move the plot window on the desktop I get a horizontal pink
:> and pink bar stretching across the screen.

: Yes, quite curious. I have no idea what it might mean.

I think this is probably a Linux/X issue, and not IDL. I tried adding the
TRUE_COLOR=24 that was suggested by Ralf, and while it didn't change much, if
I move the plot window on the screen the plot appears in color. That is,
while the plot window is being moved, the colorful plot appears. Along with
that pink/pink horizontal bar.

Cheers,
Gary
Re: All I get is gray scale [message #29088 is a reply to message #29084] Thu, 31 January 2002 13:55 Go to previous message
Ralf Flicker is currently offline  Ralf Flicker
Messages: 19
Registered: October 2001
Junior Member
gary.hodgesREMOVE@cires.colorado.edu wrote:
>
> I've read through several historical "color" threads and even bought the book
> (IDL Programming Techniques), but I'm still only able to plot gray scale.
> I've just followed the "Drawing Line Plots in Color" on page 25 of the
> Fanning book without success. The exact commands are (time and curve
> are already defined):
>
> IDL> TVLCT, [70,255,0], [70,255,255], [70,0,0], 1
> IDL> Plot, time, curve, Color=2, Background=1
>
> This produces a black plot window. To see anything I have to increase the
> color value to ~50, with higher values producing progressively less gray
> plots. I gather this goes against what I'm trying to do with the above TVLCT
> command, which is I understand things, to assign three RGB colors to indexes
> 1, 2 and 3.
>
> I have also tried "IDL> Device, Decomposed=0" trick without success.

I always have this problem after a new installation. You might
need to add true_color=24 or pseudo_color=8 to your device
assignment, depending upon what depth your screen is set to. Do
a xdpyinfo to check. HTH.

ralf
Re: All I get is gray scale [message #29089 is a reply to message #29088] Thu, 31 January 2002 13:54 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Gary Hodges(gary.hodgesREMOVE@cires.colorado.edu) writes:

> I've read through several historical "color" threads and even bought the book
> (IDL Programming Techniques), but I'm still only able to plot gray scale.
> I've just followed the "Drawing Line Plots in Color" on page 25 of the
> Fanning book without success. The exact commands are (time and curve
> are already defined):
>
> IDL> TVLCT, [70,255,0], [70,255,255], [70,0,0], 1
> IDL> Plot, time, curve, Color=2, Background=1
>
> This produces a black plot window. To see anything I have to increase the
> color value to ~50, with higher values producing progressively less gray
> plots. I gather this goes against what I'm trying to do with the above TVLCT
> command, which is I understand things, to assign three RGB colors to indexes
> 1, 2 and 3.
>
> I have also tried "IDL> Device, Decomposed=0" trick without success.

Humm. I find this hard to believe. :-)

Did you try this *before* the two commands above?
I presume you did.

Try this. Start IDL, open a window (use the Window command),
the send us the contents of a Help, /Device command.
Something is not right in Denmark.

Cheers,

David

> Curiously, if I move the plot window on the desktop I get a horizontal pink
> and pink bar stretching across the screen.

Yes, quite curious. I have no idea what it might
mean.

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Arithmetic error from NR_MACHAR()
Next Topic: ? help

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

Current Time: Wed Oct 08 14:56:37 PDT 2025

Total time taken to generate the page: 0.00658 seconds