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

Home » Public Forums » archive » semi-transparent colors and z buffer
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
semi-transparent colors and z buffer [message #39919] Fri, 25 June 2004 13:10
patrick.gatlin is currently offline  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
;----------------------------------------------------------- ---------------
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Returning an array from a function
Next Topic: Re: semi-transparent colors and z buffer

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

Current Time: Fri Oct 10 22:09:51 PDT 2025

Total time taken to generate the page: 1.44151 seconds