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

Home » Public Forums » archive » White and black colours appearing when selecting colour table
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: White and black colours appearing when selecting colour table [message #91975 is a reply to message #91971] Thu, 24 September 2015 05:41 Go to previous messageGo to previous message
liam.steele is currently offline  liam.steele
Messages: 13
Registered: September 2015
Junior Member
On Thursday, 24 September 2015 13:12:58 UTC+1, David Fanning wrote:
> Liam writes:
>
>> I have always plotted this way though, and have never noticed a problem before.
>>
>> In the example I provided, ccol[60] shows as white, and ccol[82] shows as black. So if I choose to use only 59 colours there is no problem, but any more and the white and then black lines show up.
>>
>> I'm just stumped as to why it won't work. It has device,decomposed=0, has loaded a set number of colours, and has given them an index. Maybe I should just ignore it and do something else, but it's bugging me!
>
> Those colors are loaded in the color table at the time you call
> cgColorbar. Simply load your color table before you make that call. When
> you use indexed colors, you can't guarantee your colors are correct,
> that the color table hasn't been corrupted, unless you load the colors
> immediately before you use them.
>
> Here is an article that might be related:
>
> http://idlcoyote.com/color_tips/lineinct.html
>
> 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.")

Aha! Yes, it must have been setting background=cgcolor('white') and color=cgcolor('black') that corrupted the colour table. Putting cgloatct after the call to cgplot has fixed it. Doh!

Thanks for the help. :)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: launch a file
Next Topic: Plot

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

Current Time: Wed Oct 08 16:03:13 PDT 2025

Total time taken to generate the page: 0.00312 seconds