semi-transparent colors and z buffer [message #39919] |
Fri, 25 June 2004 13:10 |
patrick.gatlin
Messages: 7 Registered: June 2004
|
Junior Member |
|
|
I am using the map_set and plots command to create an image through
the Z buffer. I have 2 datasets to be semi-transparently overlayed
onto the map. But when this is done the data overlays the map, hiding
the map data. Have searched around the web and seen several
transparency examples, but I cannot seem to get any of them to work.
Any suggestions?
;----------------------------------------------------------- ---------------
;-----Color table
r=BYTARR(256) & g=BYTARR(256) & b=BYTARR(256)
r[0]=0 & g[0]=0 & b[0]=0 ;Definition of black
r[1]=100 & g[1]=100 & b[1]=255 ;Definition of blue
r[2]=0 & g[2]=255 & b[2]=0 ;Definition of green
r[3]=255 & g[3]=255 & b[3]=0 ;Definition of yellow
r[4]=255 & g[4]=0 & b[4]=0 ;Definition of red
r[255]=255 & g[255]=255 & b[255]=255 ;Definition of white
TVLCT, r, g, b
black=0 & blue=1 & green=2 & yellow=3 & red=4 & white=255
;-----Plot
thisDevice=!D.Name
xsize=500 & ysize=500
set_plot,'z'
device,set_resolution[xsize,ysize],z_buffer=0
erase,white
map_set,x,y,[xmin,ymin,xmax,ymax],color=black,/noborder ;base image
;these next 2 overlays need to be semi-transparent
plots,lon,lat,psym=1,symsize=0.1,color=red,/data ;overlay 1
plots,lon2,lat2,psym=2,symsize=0.5,color=blue,/data ;overlay 2
snapshot=tvrd()
device,z_buffer=1
write_jpeg,file,snapshot
set_plot,thisDevice
;----------------------------------------------------------- ---------------
|
|
|