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

Home » Public Forums » archive » Background color
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
Background color [message #64281] Wed, 17 December 2008 06:29 Go to next message
nakisa is currently offline  nakisa
Messages: 24
Registered: June 2007
Junior Member
Hi.
I have an strange problem today, I use IDL.7 under linux(ubuntu) .
I try to change the background color. with below command I create the
window.

window,xsize=1400,ysize=1400

TVLCT,150,50,120,0

plot,x,y,/psym,yrange=[5.6,5.75],xrange=[9.5,11.8],charsize= 3 ,title='
none ',background=180 /NoData


I use both commands(TVLCT and background) and change the numbers ,but
still the window is in black !
but when I write the TVLCT command in the terminal and run the file ,
the color changes!!!!!!
how can I control the background color from inside of pro not
terminal ?!!
best,nakisa
Re: Background color [message #64348 is a reply to message #64281] Thu, 18 December 2008 19:20 Go to previous messageGo to next message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
On Dec 17, 9:29 am, nakisa <nakisa.noor...@gmail.com> wrote:
> Hi.
> I have an strange problem  today, I use IDL.7  under linux(ubuntu) .
> I try to change the background color. with below command I create the
> window.
>
> window,xsize=1400,ysize=1400
>
> TVLCT,150,50,120,0
>
> plot,x,y,/psym,yrange=[5.6,5.75],xrange=[9.5,11.8],charsize= 3 ,title='
> none ',background=180 /NoData
>
> I use both commands(TVLCT and background) and change the numbers ,but
> still the window is in black !
> but when I write the TVLCT command in the terminal and run the file ,
> the color changes!!!!!!
> how can I control the background color from inside of pro not
> terminal ?!!
> best,nakisa

My experience is that when I've had such problems, they are related to
DirectColor graphics.
HELP, /DEV
should tell you whether you are using TrueColor or DirectColor. You
want TrueColor. Usually,
DEVICE, TRUE=24
should solve the problem (as the first command before any other
graphics commands!), but also I assume you are using DECOMPOSED=0.

Craig
Re: Background color [message #64467 is a reply to message #64281] Tue, 23 December 2008 07:58 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
nakisa writes:

> I use ERASE ,but delete everything in plot !!
> also , I didn't used decomposed=0 ! and now use DEVISE,true=24 but
> still the background is black !!!!

The easiest way to get a different background color in a
device independent way is to use FSC_COLOR. It doesn't
care about your DEVICE setup, etc.

Plot, indgen(11), BACKGROUND=FSC_Color('light sea green'), $
COLOR=FSC_Color('dark red')

FSC_Color now supports 200 named colors, and you can add your
own, if that isn't enough for you. You can find it here:

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

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.")
Re: Background color [message #64468 is a reply to message #64348] Tue, 23 December 2008 07:40 Go to previous messageGo to next message
nakisa is currently offline  nakisa
Messages: 24
Registered: June 2007
Junior Member
Hi.
I use ERASE ,but delete everything in plot !!
also , I didn't used decomposed=0 ! and now use DEVISE,true=24 but
still the background is black !!!!
Re: Background color [message #64503 is a reply to message #64281] Fri, 02 January 2009 09:16 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
nakisa writes:

> for using FSC_Color, I use it alone in a file and run it . IDL runned
> the FSC_COLOR_COUNT_ROWS and FSC_COLOR_COLOR24, but returned 5 errors
> on the
>
> ok =3D Error_Message(/Traceback)
>
>
> as the syntax error! it is strange, because I have just copy and paste
> the pro !
> I don't know what is it !!!!

You need to download the files you need from the Coyote Library
(I would say all of them, probably), then put the Library on
your IDL path. You can find instructions here:

http://www.dfanning.com/documents/programs.html

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.")
Re: Background color [message #64504 is a reply to message #64281] Fri, 02 January 2009 09:12 Go to previous messageGo to next message
nakisa is currently offline  nakisa
Messages: 24
Registered: June 2007
Junior Member
On Jan 2, 4:36 pm, David Fanning <n...@dfanning.com> wrote:
> nakisa writes:
>> really I don't know what is DRM , I just know it plots the figure but
for using FSC_Color, I use it alone in a file and run it . IDL runned
the FSC_COLOR_COUNT_ROWS and FSC_COLOR_COLOR24, but returned 5 errors
on the

ok = Error_Message(/Traceback)


as the syntax error! it is strange, because I have just copy and paste
the pro !
I don't know what is it !!!!
nakisa



>> in Black and white and returned those errors !
>
> Yes, I agree with Lajos. Something is wrong with the way
> your computer is setup. Not with IDL. But I don't have
> any answers. Sorry.
>
> 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.")
Re: Background color [message #64505 is a reply to message #64281] Fri, 02 January 2009 08:36 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
nakisa writes:

> really I don't know what is DRM , I just know it plots the figure but
> in Black and white and returned those errors !

Yes, I agree with Lajos. Something is wrong with the way
your computer is setup. Not with IDL. But I don't have
any answers. Sorry.

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.")
Re: Background color [message #64506 is a reply to message #64281] Fri, 02 January 2009 08:28 Go to previous messageGo to next message
nakisa is currently offline  nakisa
Messages: 24
Registered: June 2007
Junior Member
really I don't know what is DRM , I just know it plots the figure but
in Black and white and returned those errors !




On Jan 2, 4:20 pm, FÖLDY Lajos <fo...@rmki.kfki.hu> wrote:
> On Fri, 2 Jan 2009, nakisa wrote:
>> libGL error: open DRM failed (Operation not permitted)
>> libGL error: reverting to (slow) indirect rendering
>
> I think this is not an IDL problem. DRM is the Direct Rendering Manager, a
> driver, which accesses your video hardware directly for 3D rendering. This
> message says that you, as a user, have no rights to access the video hw
> directly and a slower indirect rendering is used instead.
>
> Perhaps you should be a member of the 'video' group for getting direct hw
> access.
>
> regards,
> lajos
Re: Background color [message #64507 is a reply to message #64281] Fri, 02 January 2009 08:20 Go to previous messageGo to next message
Foldy Lajos is currently offline  Foldy Lajos
Messages: 268
Registered: October 2001
Senior Member
On Fri, 2 Jan 2009, nakisa wrote:

> libGL error: open DRM failed (Operation not permitted)
> libGL error: reverting to (slow) indirect rendering

I think this is not an IDL problem. DRM is the Direct Rendering Manager, a
driver, which accesses your video hardware directly for 3D rendering. This
message says that you, as a user, have no rights to access the video hw
directly and a slower indirect rendering is used instead.

Perhaps you should be a member of the 'video' group for getting direct hw
access.

regards,
lajos
Re: Background color [message #64508 is a reply to message #64281] Fri, 02 January 2009 07:21 Go to previous messageGo to next message
nakisa is currently offline  nakisa
Messages: 24
Registered: June 2007
Junior Member
On Jan 2, 2:46 pm, David Fanning <n...@dfanning.com> wrote:
> nakisa writes:
>> I test it but it doesn't work , even I try the samples on your webpage
>> at (http://www.dfanning.com/documents/programs.html)
>> on both cases IDL returns this error:
>
>> libGL error: open DRM failed (Operation not permitted)
>> libGL error: reverting to (slow) indirect rendering
>
>> Can you guess what is the problem ?
>
> No. :-)
hi , here it is :( the answer of machine )


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 10502000
Display Depth, Size: 24 bits, (1280,1024)
Visual Class: TrueColor (4)
Bits Per RGB: 8 (8/8/8)
Physical Color Map Entries (Emulated / Actual): 256 / 256
Colormap: Shared, 16777216 colors. Translation table: Bypassed
Graphics pixels: Decomposed, 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.



best,nakisa

> Please send us the result of this command:
>
>   IDL> Help, /Device
>
> 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.")
Re: Background color [message #64509 is a reply to message #64281] Fri, 02 January 2009 06:46 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
nakisa writes:

> I test it but it doesn't work , even I try the samples on your webpage
> at (http://www.dfanning.com/documents/programs.html)
> on both cases IDL returns this error:
>
> libGL error: open DRM failed (Operation not permitted)
> libGL error: reverting to (slow) indirect rendering
>
> Can you guess what is the problem ?

No. :-)

Please send us the result of this command:

IDL> Help, /Device

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.")
Re: Background color [message #64511 is a reply to message #64467] Fri, 02 January 2009 03:32 Go to previous messageGo to next message
nakisa is currently offline  nakisa
Messages: 24
Registered: June 2007
Junior Member
On Dec 23 2008, 3:58 pm, David Fanning <n...@dfanning.com> wrote:
> nakisa writes:
>> I use ERASE ,but delete everything in plot !!
>> also , I didn't used decomposed=0 ! and now use DEVISE,true=24 but
>> still the background is black !!!!
>
> The easiest way to get a different background color in a
> device independent way is to use FSC_COLOR. It doesn't
> care about your DEVICE setup, etc.
>
>    Plot, indgen(11), BACKGROUND=FSC_Color('light sea green'), $
>        COLOR=FSC_Color('dark red')
Hi David , happy new year.

I test it but it doesn't work , even I try the samples on your webpage
at (http://www.dfanning.com/documents/programs.html)
on both cases IDL returns this error:

libGL error: open DRM failed (Operation not permitted)
libGL error: reverting to (slow) indirect rendering

Can you guess what is the problem ?
cheers ,nakisa



> FSC_Color now supports 200 named colors, and you can add your
> own, if that isn't enough for you. You can find it here:
>
>   http://www.dfanning.com/programs/fsc_color.pro
>
> 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.")
Re: Background color [message #64562 is a reply to message #64503] Tue, 06 January 2009 04:32 Go to previous message
nakisa is currently offline  nakisa
Messages: 24
Registered: June 2007
Junior Member
hi David.
thanks alot. you was right ,error was because of machine ! I try on
other computer and it solves easily!!
best,nakisa
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Help needed to create image frames from dataset (mpeg movie)
Next Topic: fftw and IDL

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

Current Time: Wed Oct 08 19:42:09 PDT 2025

Total time taken to generate the page: 0.00721 seconds