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

Home » Public Forums » archive » Re: Problem changing 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: Problem changing color table [message #84473] Fri, 24 May 2013 13:25 Go to next message
Meg is currently offline  Meg
Messages: 7
Registered: May 2013
Junior Member
Thank you!

On Friday, May 24, 2013 4:21:52 PM UTC-4, Phillip Bitzer wrote:
> Check out:
>
>
>
> http://www.idlcoyote.com/color_tips/colors24.html
>
>
>
> Basically, you're looking for:
>
> DEVICE, DECOMPOSED=0
>
>
>
> (There's a lot of good information on that site for IDL programmers, new and old.)
Re: Problem changing color table [message #84474 is a reply to message #84473] Fri, 24 May 2013 13:21 Go to previous messageGo to next message
Phillip Bitzer is currently offline  Phillip Bitzer
Messages: 223
Registered: June 2006
Senior Member
Check out:

http://www.idlcoyote.com/color_tips/colors24.html

Basically, you're looking for:
DEVICE, DECOMPOSED=0

(There's a lot of good information on that site for IDL programmers, new and old.)
Re: Problem changing color table [message #87961 is a reply to message #84473] Thu, 06 March 2014 15:01 Go to previous messageGo to next message
kelle is currently offline  kelle
Messages: 4
Registered: March 2014
Junior Member
Hi,

I'm running code that used to properly deal with this issue but "all of a sudden", all of my plots are red again...for the first time in *years*.

I'm running IDL 7.0.6 (and not interested in upgrading) on Mac OS 10.8.5 and XQuartz 2.7.5.

Unfortunately, I haven't been using IDL regularly and lots of changes have probably been applied to my system since I last had regular display functionality. I suspect it's the new XQuartz?

thanks for any thoughts.

kelle

On Friday, May 24, 2013 4:25:16 PM UTC-4, Meg wrote:
> Thank you!
>
>
>
> On Friday, May 24, 2013 4:21:52 PM UTC-4, Phillip Bitzer wrote:
>
>> Check out:
>
>>
>
>>
>
>>
>
>> http://www.idlcoyote.com/color_tips/colors24.html
>
>>
>
>>
>
>>
>
>> Basically, you're looking for:
>
>>
>
>> DEVICE, DECOMPOSED=0
>
>>
>
>>
>
>>
>
>> (There's a lot of good information on that site for IDL programmers, new and old.)
Re: Problem changing color table [message #87962 is a reply to message #87961] Thu, 06 March 2014 15:44 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
kelle writes:

> 'm running code that used to properly deal with this issue but "all of a sudden", all of my plots are red again...for the first time in *years*.
>
> I'm running IDL 7.0.6 (and not interested in upgrading) on Mac OS 10.8.5 and XQuartz 2.7.5.
>
> Unfortunately, I haven't been using IDL regularly and lots of changes have probably been applied to my system since I last had regular display functionality. I suspect it's the new XQuartz?
>
> thanks for any thoughts.

Device, Decomposed=0

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: Problem changing color table [message #87964 is a reply to message #87962] Thu, 06 March 2014 15:58 Go to previous messageGo to next message
kelle is currently offline  kelle
Messages: 4
Registered: March 2014
Junior Member
Hey David,

Thanks for the quick reply.

Yes, I'm aware of that command and have had it in my code and functioning for many years. It has recently *stopped* working.

IF ~KEYWORD_SET(ps) THEN BEGIN
;set up for display to screen
set_plot,'x'
device, Decomposed=0 ;make colors work for 24-bit display
print,'debug red plots'
ENDIF

If no one else has encountered this problem with the new XQuartz or Mac OS, I will try to debug some more on my own.

thanks!
kelle

On Thursday, March 6, 2014 6:44:43 PM UTC-5, David Fanning wrote:
> kelle writes:
>
>
>
>> 'm running code that used to properly deal with this issue but "all of a sudden", all of my plots are red again...for the first time in *years*.
>
>>
>
>> I'm running IDL 7.0.6 (and not interested in upgrading) on Mac OS 10.8.5 and XQuartz 2.7.5.
>
>>
>
>> Unfortunately, I haven't been using IDL regularly and lots of changes have probably been applied to my system since I last had regular display functionality. I suspect it's the new XQuartz?
>
>>
>
>> thanks for any thoughts.
>
>
>
> Device, Decomposed=0
>
>
>
> 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: Problem changing color table [message #87965 is a reply to message #87964] Thu, 06 March 2014 16:05 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
kelle writes:

> Yes, I'm aware of that command and have had it in my code and functioning for many years. It has recently *stopped* working.
>
> IF ~KEYWORD_SET(ps) THEN BEGIN
> ;set up for display to screen
> set_plot,'x'
> device, Decomposed=0 ;make colors work for 24-bit display
> print,'debug red plots'
> ENDIF
>
> If no one else has encountered this problem with the new XQuartz or Mac OS, I will try to debug some more on my own.

I'd be curious to know what HELP, /DEVICE turns up. :-)

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: Problem changing color table [message #87966 is a reply to message #87964] Thu, 06 March 2014 16:15 Go to previous messageGo to next message
kelle is currently offline  kelle
Messages: 4
Registered: March 2014
Junior Member
On Thursday, March 6, 2014 6:58:21 PM UTC-5, kelle wrote:
> Hey David,
>
>
>
> Thanks for the quick reply.
>
>
>
> Yes, I'm aware of that command and have had it in my code and functioning for many years. It has recently *stopped* working.
>
>
>
> IF ~KEYWORD_SET(ps) THEN BEGIN
>
> ;set up for display to screen
>
> set_plot,'x'
>
> device, Decomposed=0 ;make colors work for 24-bit display
>
> print,'debug red plots'
>
> ENDIF
>
>
>
> If no one else has encountered this problem with the new XQuartz or Mac OS, I will try to debug some more on my own.
>
>
>
> thanks!
>
> kelle
>
>
>
> On Thursday, March 6, 2014 6:44:43 PM UTC-5, David Fanning wrote:
>
>> kelle writes:
>
>>
>
>>
>
>>
>
>>> 'm running code that used to properly deal with this issue but "all of a sudden", all of my plots are red again...for the first time in *years*.
>
>>
>
>>>
>
>>
>
>>> I'm running IDL 7.0.6 (and not interested in upgrading) on Mac OS 10.8.5 and XQuartz 2.7.5.
>
>>
>
>>>
>
>>
>
>>> Unfortunately, I haven't been using IDL regularly and lots of changes have probably been applied to my system since I last had regular display functionality. I suspect it's the new XQuartz?
>
>>
>
>>>
>
>>
>
>>> thanks for any thoughts.
>
>>
>
>>
>
>>
>
>> Device, Decomposed=0
>
>>
>
>>
>
>>
>
>> 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.")

ok, I think I figured it out. I just needed to explicitly define the color of the plot (color_line). I've never needed to do this before, but it worked!

The annotations are all still red...guess I need to also explicitly give those colors in the xyouts commands.

What's the "default" color? Does it use whatever is assigned to 255? Cause if so, that would explain it. (And maybe I changed my custom color table? this is starting to ring some bells...)

kelle

@colors_kc ; loads custom color table gives colors names
color_line = black
IF ~KEYWORD_SET(ps) THEN BEGIN
;set up for display to screen
set_plot,'x'
device, Decomposed=0 ;make colors work for 24-bit display
print,'ye'
color_line=white
ENDIF
plot, w, spec, [...], color=color_line
Re: Problem changing color table [message #87967 is a reply to message #87966] Thu, 06 March 2014 16:25 Go to previous messageGo to next message
kelle is currently offline  kelle
Messages: 4
Registered: March 2014
Junior Member
On Thursday, March 6, 2014 7:15:27 PM UTC-5, kelle wrote:
> On Thursday, March 6, 2014 6:58:21 PM UTC-5, kelle wrote:
>
>> Hey David,
>
>>
>
>>
>
>>
>
>> Thanks for the quick reply.
>
>>
>
>>
>
>>
>
>> Yes, I'm aware of that command and have had it in my code and functioning for many years. It has recently *stopped* working.
>
>>
>
>>
>
>>
>
>> IF ~KEYWORD_SET(ps) THEN BEGIN
>
>>
>
>> ;set up for display to screen
>
>>
>
>> set_plot,'x'
>
>>
>
>> device, Decomposed=0 ;make colors work for 24-bit display
>
>>
>
>> print,'debug red plots'
>
>>
>
>> ENDIF
>
>>
>
>>
>
>>
>
>> If no one else has encountered this problem with the new XQuartz or Mac OS, I will try to debug some more on my own.
>
>>
>
>>
>
>>
>
>> thanks!
>
>>
>
>> kelle
>
>>
>
>>
>
>>
>
>> On Thursday, March 6, 2014 6:44:43 PM UTC-5, David Fanning wrote:
>
>>
>
>>> kelle writes:
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>> 'm running code that used to properly deal with this issue but "all of a sudden", all of my plots are red again...for the first time in *years*.
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> I'm running IDL 7.0.6 (and not interested in upgrading) on Mac OS 10.8.5 and XQuartz 2.7.5.
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> Unfortunately, I haven't been using IDL regularly and lots of changes have probably been applied to my system since I last had regular display functionality. I suspect it's the new XQuartz?
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> thanks for any thoughts.
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>> Device, Decomposed=0
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>> 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.")
>
>
>
> ok, I think I figured it out. I just needed to explicitly define the color of the plot (color_line). I've never needed to do this before, but it worked!
>
>
>
> The annotations are all still red...guess I need to also explicitly give those colors in the xyouts commands.
>
>
>
> What's the "default" color? Does it use whatever is assigned to 255? Cause if so, that would explain it. (And maybe I changed my custom color table? this is starting to ring some bells...)
>
>
>
> kelle
>
>
>
> @colors_kc ; loads custom color table gives colors names
>
> color_line = black
>
> IF ~KEYWORD_SET(ps) THEN BEGIN
>
> ;set up for display to screen
>
> set_plot,'x'
>
> device, Decomposed=0 ;make colors work for 24-bit display
>
> print,'ye'
>
> color_line=white
>
> ENDIF
>
> plot, w, spec, [...], color=color_line

yep, just needed to have white as the last color. It was just a coincidence that I had modified the color table to have red as color 255...thus mimicking the Device, Decomposed = 0 problem. sneaky, sneaky.

I wonder, does that also mean that for good color table modification practice, one should also always keep black as color 0?

thanks!
kelle
Re: Problem changing color table [message #87968 is a reply to message #87967] Thu, 06 March 2014 16:32 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
kelle writes:

> I wonder, does that also mean that for good color table modification practice, one should also always keep black as color 0?

I think it means you should just use Coyote Graphics and never have to
worry about these kinds of things again. :-)

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.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Run Fortran executable in IDL
Next Topic: log axis with negative numbers

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

Current Time: Wed Oct 08 15:11:36 PDT 2025

Total time taken to generate the page: 0.01160 seconds