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

Home » Public Forums » archive » Re: Aspect ratio for 'PS' output
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
Re: Aspect ratio for 'PS' output [message #12401] Thu, 30 July 1998 00:00
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Amit Ghosh (amit@physics.utoronto.ca) writes:

> I am unable to control the aspect ratio for contour plots directed to
> postscript output (for std 'X' output the plot sizes to the window
> size). I am in particular making geographic plots by first setting up my
> coordinate system using `map_set'. Is there a straightforward way to do
> this ?

I have a couple of programs that might help in this respect.
They help you control either the size of the plotting "window"
or the location of the plot in the window. Both programs,
named ASPECT and PSWINDOW, can be downloaded from my web
page.

The ASPECT program returns a vector of normalized
coordinates to be used with the POSITION keyword to
locate a plot in the output graphics window. It works
identically whether your graphics window is the display
or a PostScript page. For example, if you want to have
a map projection with a height to width ratio of 3/4,
you would type this command:

Map_Set, /Cylindrical, Position=Aspect(0.75), /Grid
Contour, data, /Overplot

If, on the other hand, you want your PostScript output
to have the same aspect ratio as the plot does in your
display window, you might use PSWINDOW. This program
returns DEVICE keywords to set the PostScript window
to have the same aspect ratio as the current graphics
window. The calls would look something like this:

parameters = PSWindow()
thisDevice = !D.Name
Set_Plot, 'PS'
Device, _Extra=parameters
Map_Set, /Cylindrical, Grid, /Continents
Contour, data, /Overplot
Device, /Close
Set_Plot, thisDevice

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: Aspect ratio for 'PS' output [message #12404 is a reply to message #12401] Thu, 30 July 1998 00:00 Go to previous message
wmc is currently offline  wmc
Messages: 117
Registered: February 1995
Senior Member
In article 41C6@physics.utoronto.ca, Amit Ghosh <amit@physics.utoronto.ca> writes:
> I am unable to control the aspect ratio for contour plots directed to
> postscript output (for std 'X' output the plot sizes to the window
> size). I am in particular making geographic plots by first setting up my
> coordinate system using `map_set'. Is there a straightforward way to do
> this ?

If you are using geographic plots, the chances are that you want to add "/iso"
to the map_set, which make the x- and y- coords represent the same lengths.

If you want to change the size of ps output, well, probably you want to
look at David Fannings page, but in brief, you can say:

device,xoff=xthing,yoff=ything,xs=xsize,ys=ysize

See the manual for more info...

- William

---
William M Connolley | wmc@bas.ac.uk | http://www.nbs.ac.uk/public/icd/wmc/
Climate Modeller, British Antarctic Survey | Disclaimer: I speak for myself
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Droplists
Next Topic: Droplists

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

Current Time: Fri Oct 10 21:35:51 PDT 2025

Total time taken to generate the page: 1.75081 seconds