In article <33D3E582.51B6@nrlssc.navy.mil>, Don Stark
<stark@nrlssc.navy.mil> wrote:
> Hi - I have an image that is the result of combining three elements.
> First using the mapping utilities a stereographic projection of the
> earth is set up. Then the elevation data is overlayed as a color image
> with the tv routine. Lastly, a pressure field is overlayed with the
> contour routine -- I've included the code below.
>
> When I display this as an x-windows image, it looks perfect. When I
> attempted to convert it to write as a color postscript file the images
> no longer overlap correctlyand are scaled differently. It looks like the
> tv image is no longer scaled correctly by the map_image and/or map_patch
> routines.
>
> Any help on this would be greatly appreciated. Thanks
>
> ;+
> ; Postscript output
> ;-
> Set_Plot, "ps", /interpolate
> Device, filename="temp.ps",/color, bits=8
>
> map_set,90,0,0, /stereo,/isotropic,limit=[45,-180,90,180]
> openr, unit,
> filepath('worldelv.dat',SUB=['examples','data']),/get_lun
> elev = bytarr(360,360) & new_elev = bytarr(360,360)
> readu, unit, elev
> close, unit
> elev = shift(elev,180,0)
> new_elev = map_image(elev,sx,sy,/bilin)
> tv,new_elev,sx,sy
>
> map_grid, glinestyle=0,glinethick=1,charsize=1.2,
> /label,color=255
> contour,temp_field,lon,lat,NLEVELS = 8,/FOLLOW,/overplot,
> color=203
>
> Device, /Close
>
> end
I generally use something of the form:
; map_set or plot
px = !x.window*!d.x_size
py = !y.window*!d.y_size
xWinsize = px(1)-px(0)
yWinsize = py(1)-py(0)
tv, data, px(0), py(0), xsize=xWinsize, ysize=yWinsize
However, map_image will return xsize and ysize for you to use in the call
to tv as well. This is because Postscript uses scalable pixels.
--
Robert.M.Candey@gsfc.nasa.gov
NASA Goddard Space Flight Center, Code 632
Greenbelt, MD 20771 USA 1-301-286-6707
|