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

Home » Public Forums » archive » possible bug in ps conversion when combining tv and contour
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: possible bug in ps conversion when combining tv and contour [message #9634 is a reply to message #9546] Tue, 22 July 1997 00:00 Go to previous message
Robert.M.Candey is currently offline  Robert.M.Candey
Messages: 23
Registered: June 1995
Junior Member
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
[Message index]
 
Read Message
Read Message
Previous Topic: ========= SUCCESS =========================
Next Topic: Advanced IDL Programming Course

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

Current Time: Wed Oct 08 19:13:06 PDT 2025

Total time taken to generate the page: 0.00426 seconds