pro three fitsname='../gaussfit.fits' a=mrdfits(fitsname) head=headfits(fitsname);read the header of the fits file to a vector nx = fxpar(head,'NAXIS1'); number of elements in the first dimension ny = fxpar(head,'NAXIS2'); nv = fxpar(head,'NAXIS3'); ;a=read_binary('/home/qianl/Software/idl_6.2/examples/data/head.dat',$ ; data_dims=[80,100,57],data_type=1) b=lindgen(nx,ny,nv) bnz0=b/nx/ny bny0=(b-bnz0*nx*ny)/nx bnx0=b-bnz0*nx*ny-bny0*nx bx=bnx0*1.0d0 by=bny0*1.0d0 bv=bnz0*1.0d0 ;a=exp(-((bx-30.0)/10.0)^2-((by-30.0)/10.0)^2-((bv-30.0)/10.0)^2) shade_volume,a,max(a)/2.0,v,p,/low scale3,xrange=[0,nx-1],yrange=[0,ny-1],zrange=[0,nv-1] set_plot,'PS' filename='3d_TV.ps' ; set the file name of the output ps file device,file=filename,/COLOR, BITS=8 tv,polyshade(v,p,/t3d) device,/CLOSE end