Re: Aspect ratio for 'PS' output [message #12401] |
Thu, 30 July 1998 00:00 |
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  |
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
|
|
|