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

Home » Public Forums » archive » Re: on the background color of cgplot
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: on the background color of cgplot [message #84448] Mon, 27 May 2013 09:57
simona bellavista is currently offline  simona bellavista
Messages: 56
Registered: December 2009
Member
> What graphic card do you have on the server? (try lspci if you don't know).


I had already tried lspci, but Command not found

> I have just tried to set up VNC with tightvnc on a 15 years old ATI Rage 128 Pro, "vncserver -depth 32 :1" works as expected.

I tried again and it works, I did something stupid earlier.

and surprise, surprise ... true_color=24 also works and no weird colors in cgplot (yeah!)

Thank you a lot, Still many things to learn :D
Re: on the background color of cgplot [message #84449 is a reply to message #84448] Mon, 27 May 2013 09:24 Go to previous message
Lajos Foldy is currently offline  Lajos Foldy
Messages: 176
Registered: December 2011
Senior Member
On Monday, May 27, 2013 5:33:50 PM UTC+2, simona bellavista wrote:

> I guess that if my graphic card is 16-bit I cannot select a different pixel depth (when I try to do so starting vncserver Xvnc fails). How can I know about the properties of my graphic card?

What graphic card do you have on the server? (try lspci if you don't know).

I have just tried to set up VNC with tightvnc on a 15 years old ATI Rage 128 Pro, "vncserver -depth 32 :1" works as expected.

regards,
Lajos
Re: on the background color of cgplot [message #84450 is a reply to message #84449] Mon, 27 May 2013 08:33 Go to previous message
simona bellavista is currently offline  simona bellavista
Messages: 56
Registered: December 2009
Member
On Monday, May 27, 2013 5:19:11 PM UTC+2, fawltyl...@gmail.com wrote:
> On Monday, May 27, 2013 5:05:01 PM UTC+2, simona bellavista wrote:
>
>
>
>> % Unsupported X Windows visual (class: PseudoColor, depth: 8).
>
>> Substituting default (class: TrueColor, Depth: 16).
>
>>
>
>> So, no solution?
>
>
>
> You are using a VNC connection, so try some VNC server/client switches, eg
>
> vncviewer -truecolor or -owncmap, -depth 32 or -depth 24 with truecolor, etc.
>
> Also, you can use -depth 8 or 32 on the server side, too. Experimental computer science :-)
>
>
>
> regards,
>
> Lajos

I guess that if my graphic card is 16-bit I cannot select a different pixel depth (when I try to do so starting vncserver Xvnc fails). How can I know about the properties of my graphic card?
Re: on the background color of cgplot [message #84451 is a reply to message #84450] Mon, 27 May 2013 08:19 Go to previous message
Lajos Foldy is currently offline  Lajos Foldy
Messages: 176
Registered: December 2011
Senior Member
On Monday, May 27, 2013 5:05:01 PM UTC+2, simona bellavista wrote:

> % Unsupported X Windows visual (class: PseudoColor, depth: 8).
> Substituting default (class: TrueColor, Depth: 16).
>
> So, no solution?

You are using a VNC connection, so try some VNC server/client switches, eg
vncviewer -truecolor or -owncmap, -depth 32 or -depth 24 with truecolor, etc.
Also, you can use -depth 8 or 32 on the server side, too. Experimental computer science :-)

regards,
Lajos
Re: on the background color of cgplot [message #84452 is a reply to message #84451] Mon, 27 May 2013 08:14 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
simona bellavista writes:

> I put device, pseudo_color=8 in the start-up file
>
> % Unsupported X Windows visual (class: PseudoColor, depth: 8).
> Substituting default (class: TrueColor, Depth: 16).
>
> So, no solution?

I hear machines are pretty cheap these days. :-)

Cheers,

David

P.S. This could be just a configuration issue, too. You would have to
consult with someone who knows something about the subject. That is, not
me. :-)



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: on the background color of cgplot [message #84453 is a reply to message #84452] Mon, 27 May 2013 08:05 Go to previous message
simona bellavista is currently offline  simona bellavista
Messages: 56
Registered: December 2009
Member
On Monday, May 27, 2013 4:48:46 PM UTC+2, David Fanning wrote:
> You could probably get by setting this machine up to use an 8-bit
>
> pseudocolor visual class. Coyote Graphics routines can work in this
>
> environment, although it is never ideal.
>
I put device, pseudo_color=8 in the start-up file

% Unsupported X Windows visual (class: PseudoColor, depth: 8).
Substituting default (class: TrueColor, Depth: 16).

So, no solution?
Re: on the background color of cgplot [message #84455 is a reply to message #84453] Mon, 27 May 2013 07:48 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> Here is your problem! You will get screwed up colors if you try to
> specify colors with 24-bit values, as all Coyote Graphics routines do. I
> don't know why your machine can't do 24-bit color (no 24-bit graphics
> card?), but not much I can do about it. Sorry.

You could probably get by setting this machine up to use an 8-bit
pseudocolor visual class. Coyote Graphics routines can work in this
environment, although it is never ideal.

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: on the background color of cgplot [message #84456 is a reply to message #84455] Mon, 27 May 2013 07:45 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
simona bellavista writes:

> In fact now that you ask, I notice that idl issues the following warning:
>
> % Unsupported X Windows visual (class: TrueColor, depth: 24).
> Substituting default (class: TrueColor, Depth: 16).

Here is your problem! You will get screwed up colors if you try to
specify colors with 24-bit values, as all Coyote Graphics routines do. I
don't know why your machine can't do 24-bit color (no 24-bit graphics
card?), but not much I can do about it. Sorry.

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: on the background color of cgplot [message #84457 is a reply to message #84456] Mon, 27 May 2013 07:31 Go to previous message
Phillip Bitzer is currently offline  Phillip Bitzer
Messages: 223
Registered: June 2006
Senior Member
On Sunday, May 26, 2013 1:36:46 PM UTC-5, simona bellavista wrote:

> I noticed that if I put explictly background=cgcolor('white') in the cgplot, the background is correctly white. While if I put color=cgcolor('black'), the points are black but the axes are still cyan. I would like to set the background and the color once at the beginning before calling cgplot. Is this possible?


Not sure if it's causing your specific problem but be careful. Use this:
IDL> cgPLOT, dist(10), COLOR='black'

and *not*
IDL> cgPLOT, dist(10), COLOR=cgCOLOR('black')


http://www.idlcoyote.com/cg_tips/extracolors.php
Re: on the background color of cgplot [message #84458 is a reply to message #84457] Mon, 27 May 2013 07:30 Go to previous message
simona bellavista is currently offline  simona bellavista
Messages: 56
Registered: December 2009
Member
>
> This sounds to me like the cluster machine is using 16-bit color, rather
>
> than 24-bit color. Could you log onto the cluster and run IDL without
>
> running your initializing script? From inside of IDL, I'd like to know
>
> the results of this command:
>
>
>
> 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 X.Org Foundation, Release 70101000
Display Depth, Size: 16 bits, (1024,768)
Visual Class: TrueColor (4)
Bits Per RGB: 8 (5/6/5)
Physical Color Map Entries (Emulated / Actual): 256 / 64
Colormap: Private, 65536 colors. Translation table: Enabled
Graphics pixels: Decomposed, Dither Method: Ordered
Write Mask: 65535 (decimal) ffff (hex)
Graphics Function: 3 (copy)
Current Font: <default>, Current TrueType Font: <default>
Default Backing Store: Req from Server.

In fact now that you ask, I notice that idl issues the following warning:

% Unsupported X Windows visual (class: TrueColor, depth: 24).
Substituting default (class: TrueColor, Depth: 16).


> I suspect you are unsuccessful in putting IDL into 24-bit mode on this
>
> cluster machine. Maybe because an IDL graphics window has already been
>
> opened by the time your initializing script is run. On UNIX, once a
>
> window is opened, you cannot change the depth of the visual class that
>
> is selected.

Actually the offending line in my script are:

!p.background=white
!p.color =black

(that I forgot in my previous post, sorry, my fault!!)

The peculiar think is that if I remove these lines, everything is OK and both plot and cgplot give white on black graphics.
If I insert the above lines I get this problem with cgplot. But if I write

cgplot, dindgen(10), background=white, color=black

I get black on white (but cyan axes).

>
>
> I'd also be curious what cgPlot would do if you set yourself up in
>
> decomposed color mode (Decomposed=1, which is what I recommend you do if
>
> you want to use Coyote Graphics routines).
>


I get cyan on red with cgplot and black on red with plot
Re: on the background color of cgplot [message #84466 is a reply to message #84458] Sun, 26 May 2013 13:56 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
simona bellavista writes:

> I have a peculiar problem with cgplot, the background is red and the points that are supposed to be black are cyan. This only happen when I connect to the computer cluster via vnc and use cgplot. If I use 'plot' instead of 'cgplot', I correctly get a black on white figure.
> I noticed that if I put explictly background=cgcolor('white') in the cgplot, the background is correctly white. While if I put color=cgcolor('black'), the points are black but the axes are still cyan. I would like to set the background and the color once at the beginning before calling cgplot. Is this possible?

This sounds to me like the cluster machine is using 16-bit color, rather
than 24-bit color. Could you log onto the cluster and run IDL without
running your initializing script? From inside of IDL, I'd like to know
the results of this command:

IDL> Help, /Device

I suspect you are unsuccessful in putting IDL into 24-bit mode on this
cluster machine. Maybe because an IDL graphics window has already been
opened by the time your initializing script is run. On UNIX, once a
window is opened, you cannot change the depth of the visual class that
is selected.

I'd also be curious what cgPlot would do if you set yourself up in
decomposed color mode (Decomposed=1, which is what I recommend you do if
you want to use Coyote Graphics routines).

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: on the background color of cgplot [message #84467 is a reply to message #84466] Sun, 26 May 2013 12:04 Go to previous message
simona bellavista is currently offline  simona bellavista
Messages: 56
Registered: December 2009
Member
it is a linux cluster

On Sunday, May 26, 2013 8:58:37 PM UTC+2, Mats Löfdahl wrote:
> Den söndagen den 26:e maj 2013 kl. 20:36:46 UTC+2 skrev simona bellavista:
>
>
>
>> if(!version.os_family eq 'unix') then device, true_color=24
>
>
>
> Does your cluster run unix?
Re: on the background color of cgplot [message #84468 is a reply to message #84467] Sun, 26 May 2013 11:58 Go to previous message
Mats Löfdahl is currently offline  Mats Löfdahl
Messages: 263
Registered: January 2012
Senior Member
Den söndagen den 26:e maj 2013 kl. 20:36:46 UTC+2 skrev simona bellavista:

> if(!version.os_family eq 'unix') then device, true_color=24

Does your cluster run unix?
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: nested structures
Next Topic: Re: type conversion error - help needed urgent

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

Current Time: Wed Oct 08 11:42:01 PDT 2025

Total time taken to generate the page: 0.00652 seconds