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

Home » Public Forums » archive » Color tables
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: Color tables [message #29719 is a reply to message #17997] Thu, 07 March 2002 07:05 Go to previous message
Ken Mankoff is currently offline  Ken Mankoff
Messages: 158
Registered: February 2000
Senior Member
On Thu, 7 Mar 2002, Robert Stockwell wrote:

> Clive Cook wrote:
>> Is there any where on the web i can download color table files that other
>> people have put together?

Here is my colortable production code:
Note that if you call it with the /DISPLAY keyword, you need the JHU
cbar.pro program


pro snoect, display=display
; RED GRN BLU LOC
rgb = [ [ 000, 000, 000, 000 ], $ ; first pixel (0) is black
[ 000, 000, 255, 001 ], $ ; blue (true)
[ 000, 150, 255, 032 ], $ ; mid blue
[ 000, 220, 220, 060 ], $ ; blue/green
[ 000, 255, 000, 110 ], $ ; green (true)
[ 150, 255, 000, 120 ], $ ; lime green
[ 255, 255, 000, 150 ], $ ; yellow
[ 255, 220, 000, 180 ], $ ; gold
[ 255, 150, 000, 225 ], $ ; orange
[ 255, 000, 000, 254 ], $ ; red (true)
[ 255, 255, 255, 255 ] ] ; last pixel (255) is white

r = interpol( rgb[ 0, * ], rgb[3,*], indgen(256) ) >0<255
g = interpol( rgb[ 1, * ], rgb[3,*], indgen(256) ) >0<255
b = interpol( rgb[ 2, * ], rgb[3,*], indgen(256) ) >0<255
tvlct, r, g, b

if ( keyword_set( display ) ) then begin
IF ( !d.name EQ 'X' ) THEN window, 2
plot, rgb[3,*], rgb[0,*], /xst, position=[.1,.3,.9,.9], $
/yst, yrange=[0,256], $
xtickv=indgen(9)*32, xticks=10, charsize=1.5
oplot, rgb[3,*], rgb[0,*], color=254, thick=3, psym=-6
oplot, rgb[3,*], rgb[1,*], color=110, thick=3, psym=-6
oplot, rgb[3,*], rgb[2,*], color=40, thick=3, psym=-6
cbar, position=[.1,.1,.9,.2], /xst, xtickv=indgen(9)*32, xticks=10
endif
end
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Color tables
Next Topic: un-Mask?/PolyOutlineV?

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

Current Time: Sun Oct 12 17:06:20 PDT 2025

Total time taken to generate the page: 0.80079 seconds