[R] controling graphic window size and asprec ratio in windows

Timothy H. Keitt tklistaddr at keittlab.bio.sunysb.edu
Fri Jul 19 21:53:42 CEST 2002


I just ran into that with my GDAL package. Here's an excerpt:

  par.in <- par(no.readonly = TRUE)

  if (reset.par) on.exit(par(par.in))

  par(pin = max(par.in$pin)
      * par.in$fin / max(par.in$fin)
      * rev(plot.dim) / max(plot.dim))

plot.dim gives the rows and cols of the image data. There are some other
adjustments that one could make, but note that if you manually resize
the plot window, the aspect ratio (from R's perspective) does not
change--you have to start a new plot window with the specified size.

Tim


On Fri, 2002-07-19 at 14:18, Erich Neuwirth wrote:
> i am using the rarcinfo package
> to draw maps.
> for maps, th aspect ratio is quite important.
> how can i control the aspect ratio and the size of a graphics window
> in the mswindows version of R and more generally in R in general.
> i would like to e able to both set the size before or while the window 
> is corrected,
> and also for a window which already exists.
> 
> -- 
> --
> Erich Neuwirth, Computer Supported Didactics Working Group
> Visit our SunSITE at http://sunsite.univie.ac.at
> Phone: +43-1-4277-38624 Fax: +43-1-4277-9386
> 
> 
> 
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list