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

Home » Public Forums » archive » Mac display help
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: Mac display help [message #16976 is a reply to message #16883] Thu, 26 August 1999 00:00 Go to previous message
Liam Gumley is currently offline  Liam Gumley
Messages: 473
Registered: November 1994
Senior Member
Barbara A Cohen wrote:
> Hi, I have been using idl for about a year on a UNIX system, where I output
> everything to a postscript file, looked at the postscript, and made
> adjustments as necessary to xyouts, etc. I have just gotten idl for
> my Mac and of course can't do things that way. I tried installing
> GhostScript but it makes my computer crash every time. What I'd like
> to do is have a display window that at least positions everything the way
> it will come out when I write to postscript. As it is now, the positions
> and thicknesses are all weird. I'm sorry if this is an old question
> but does anyone know how to deal with the Mac display windows? Thanks
> in advance for anyone's suggestions...

Barbara,

David's previous comments about normalized coordinates are very
important. What he means is that everything on your display should be
positioned using normalized coordinates, not pixel coordinates. Another
tip is to create a display window which has the same aspect as a printed
page. The following example shows how to do this for Landscape output.
Start a new IDL session, and try the following:

;- Create a graphics window with the same aspect as a landscape page
device, true=24, decomposed=0, retain=2
window, /free, xsize=924, ysize=714
device, set_character_size=[10, 12]

;- Display a surface plot and label
loadct, 0
shade_surf, dist(32), position=[0.2, 0.2, 0.5, 0.5], charsize=2
xyouts, 0.75, 0.75, 'IDL Surface Plot', /normal, align=0.5, charsize=2

;- Change to Postscript landscape mode
set_plot, 'PS'
device, /landscape, /color, bits=8

;- Display a surface plot and label
loadct, 0
shade_surf, dist(32), position=[0.2, 0.2, 0.5, 0.5], charsize=2
xyouts, 0.75, 0.75, 'IDL Surface Plot', /normal, align=0.5, charsize=2

;- Close the Postscript file
device, /close

You should see that the Postscript output looks very similar to the
display window. Note how the POSITION keyword was used to position the
surface plot using normal coordinates, which start at 0.0,0.0 at the
bottom left, and end at 1.0,1.0 at upper right. For more information,
type

? normal coordinates

at the IDL command line.

Cheers,
Liam.
PS: *And* check out David's tips for perfect Postscript output.

--
Liam E. Gumley
Space Science and Engineering Center, UW-Madison
http://cimss.ssec.wisc.edu/~gumley
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Resetting data in IDLgrVolume object
Next Topic: looking for beta-tester to ION demonstration

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

Current Time: Fri Nov 28 10:30:56 PST 2025

Total time taken to generate the page: 2.40531 seconds