From: Barry Rowlingson <B.Rowlingson_at_lancaster.ac.uk>

Date: Wed 20 Apr 2005 - 01:28:49 EST

R-help@stat.math.ethz.ch mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Apr 20 01:36:53 2005

Date: Wed 20 Apr 2005 - 01:28:49 EST

Suppose I have the following data I want to scatterplot:

* > xy
*

[,1] [,2]

[1,] 0 0

[2,] 21 4

I start up a graphics window and fire away:

> plot(xy)

- but because the graphics window is square, the aspect ratio is wrong. So I add:

> plot(xy, asp=1)

- now the aspect ratio is correct, but the Y range is about -8 to 11, whereas my data has a Y range of 0 to 4. The plot appears in the middle of a mostly empty square. So lets try:

> plot(xy, asp=1, ylim=c(0,4))

- which seemingly changes nothing. The reason being that par()$pty is 'm', which means to use as much of the plot area as possible. The only other option is 's' which produces a square plot. I want it to produce a very rectangular plot. R cant comply with all these requests.

If I leave par(pty='m') then I can change the shape of the graphics window until I get the effect I want, but this seems an unsatisfactory way of doing it, and when I come to make a PostScript version I need to set the dimensions of the PS device correctly.

Barry

R-help@stat.math.ethz.ch mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Apr 20 01:36:53 2005

*
This archive was generated by hypermail 2.1.8
: Fri 03 Mar 2006 - 03:31:17 EST
*