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
|