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

Home » Public Forums » archive » How to load a customized 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
How to load a customized color table? [message #64647] Sat, 10 January 2009 09:22
ICBM0926 is currently offline  ICBM0926
Messages: 6
Registered: July 2008
Junior Member
Dear all
I've tried to load a customized color table with "TVLCT" in a
procedure. I called this procedure from another one, but the plot
generated uses B-W color table instead of a red-blue one.
I can't get this thing work. Can anyone tell me where go wrong?

The code is attached below.
pro ctloader
;loadct,25
;COMMON COLORS, R_Orig, G_Orig, B_Orig, R_curr, G_curr, B_curr
COMMON COLORS, r, g, b, R_curr, G_curr, B_curr
print,"This is ctloader."
r=dblarr(256)
r[0:127]=reverse(2.0*findgen(128))
r[128:255]=0.0
R_curr=r
b=dblarr(256)
b[0:127]=0.0
b[128:255]=2.0*findgen(128)
B_curr=b
g=dblarr(256)
g=0.0
G_curr=g
tvlct,r,g,b
end
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Book Shipping Costs Astronomical
Next Topic: Re: How to write an array into a dateset as a band, not a dateset?

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

Current Time: Fri Oct 10 11:37:38 PDT 2025

Total time taken to generate the page: 0.08296 seconds