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

Home » Public Forums » archive » Re: cgcolor, cgplot, and /WINDOW
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: cgcolor, cgplot, and /WINDOW [message #75516 is a reply to message #75515] Wed, 23 March 2011 04:12 Go to previous messageGo to previous message
Foldy Lajos is currently offline  Foldy Lajos
Messages: 268
Registered: October 2001
Senior Member
Hi David,

On Tue, 22 Mar 2011, David Fanning wrote:

> So, the take home message is this. (1) Call the programs
> they way they were meant to be called, or (2) Swear off
> indexed color forever. I can assure you if you choose (2)
> life will be very, very pleasant for you. You may even
> come to understand how color works in IDL. :-)

I usually use 'BBGGRR'x numbers for 24-bit colors, as suggested by the IDL
documentation. I use decomposed mode, but cgPlot still has some problems
with it:

IDL> device, /decomposed
IDL> cgplot, dist(10), color='FF0000'x, /window ; blue, OK
IDL> cgplot, dist(10), color='00FF00'x, /window ; green, OK
IDL> cgplot, dist(10), color='0000FF'x, /window ; black, ???
IDL> cgplot, dist(10), color='005050'x, /window ; error

Traceback Report from CGPLOT:

% Attempt to subscript R with C2 is out of range.
% Execution halted at: COLORSAREIDENTICAL 121 colorsareidentical.pro
% CGPLOT 384 cgplot.pro
% FSC_WINDOW_COMMAND::DRAW 1512 cgwindow.pro
% FSC_CMDWINDOW::EXECUTECOMMANDS 399 cgwindow.pro
% CGWINDOW 2017 cgwindow.pro
% CGPLOT 248 cgplot.pro
% $MAIN$
cgPlot, p1, COLOR=value, NOERASE=value

It seems to be that cgPlot uses color tables even in decomposed mode. Or I
am breaking your (1) rule simply :-)

regards,
Lajos

ps: after writing the above, I have found the solution: 24-bit colors must
be specified as long numbers, '0000FF'xl and '005050'xl works.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: lat/lon projection
Next Topic: AVHRR Calibration and Georeferencing

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

Current Time: Wed Oct 08 15:50:29 PDT 2025

Total time taken to generate the page: 0.00220 seconds