Re: [R] aspect ratio 1 and blank space

2010-11-18 Thread Greg Snow
greg.s...@imail.org 801.408.8111 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- project.org] On Behalf Of Silvia Cecere Sent: Wednesday, November 17, 2010 10:26 AM To: r-help@r-project.org Subject: [R] aspect ratio 1 and blank space Hi, I need

[R] aspect ratio 1 and blank space

2010-11-17 Thread Silvia Cecere
Hi, I need to produce an ordinary scatter plot and it is vital that the aspect ratio equals 1. I set the axis as: plot(x, y, type=n, asp=1, ,ylim=c(-80,70),xlim=c(0,100)). The problem is that I get some 'additional' blank plot area (basically, the lower bound of xlim becomes quite

Re: [R] aspect ratio 1 and blank space

2010-11-17 Thread Bert Gunter
On Windows R 2.12.0, the following seemed to work for me: par(pty=s) ## before plotting plot(1:10,xlim=c(0,20),ylim=c(0,30)) I do not find that setting the asp parameter does anything useful; indeed, the Help documentation seems to be backwards (asp=x/y not y/x). I probably misunderstood

Re: [R] aspect ratio 1 and blank space

2010-11-17 Thread Peter Ehlers
On 2010-11-17 09:26, Silvia Cecere wrote: Hi, I need to produce an ordinary scatter plot and it is vital that the aspect ratio equals 1. I set the axis as: plot(x, y, type=n, asp=1, ,ylim=c(-80,70),xlim=c(0,100)). The problem is that I get some 'additional' blank plot area (basically, the

Re: [R] Aspect Ratio

2010-08-23 Thread Greg Snow
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- project.org] On Behalf Of r.ookie Sent: Thursday, August 19, 2010 3:29 PM To: David Winsemius Cc: r-help@r-project.org Subject: Re: [R] Aspect Ratio Well, I had to look further into the documentation to see 'If asp

Re: [R] Aspect Ratio

2010-08-23 Thread Peter Ehlers
On 2010-08-19 16:36, r.ookie wrote: This example definitely clarified a situation where 'asp' is useful/helpful. Thanks! Ted's last example is a bit misleading. You don't get the same result from setting xlim and ylim equal as you do from using 'asp'. Indeed, this should help you to

[R] Aspect Ratio

2010-08-19 Thread r.ookie
set.seed(1) x - rnorm(n = 1000, mean = 0, sd = 1) plot(x = x, asp = 2000) Could someone please explain what the 'asp' parameter is doing? __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Aspect Ratio

2010-08-19 Thread Joshua Wiley
Hi, From the documentation for ?plot 'asp' the y/x aspect ratio, see 'plot.window'. Here is a little demonstration of what different values would look like: # set.seed(1) x - rnorm(n = 1000, mean = 0, sd = 1) # so that four plots can be in one window for comparison

Re: [R] Aspect Ratio

2010-08-19 Thread David Winsemius
On Aug 19, 2010, at 5:13 PM, r.ookie wrote: set.seed(1) x - rnorm(n = 1000, mean = 0, sd = 1) plot(x = x, asp = 2000) Could someone please explain what the 'asp' parameter is doing? You want us to read the help page to you? -- David Winsemius, MD West Hartford, CT

Re: [R] Aspect Ratio

2010-08-19 Thread r.ookie
Well, I had to look further into the documentation to see 'If asp is a finite positive value then the window is set up so that one data unit in the x direction is equal in length to asp * one data unit in the y direction' Okay, so in what situations is the 'asp' helpful? On Aug 19, 2010, at

Re: [R] Aspect Ratio

2010-08-19 Thread David Winsemius
On Aug 19, 2010, at 5:28 PM, r.ookie wrote: Well, I had to look further into the documentation to see 'If asp is a finite positive value then the window is set up so that one data unit in the x direction is equal in length to asp * one data unit in the y direction' Okay, so in what

Re: [R] Aspect Ratio

2010-08-19 Thread r.ookie
I'm asking to get people's interpretation and also whether they've encountered situations where it was useful, helpful, etc. On Aug 19, 2010, at 2:36 PM, David Winsemius wrote: On Aug 19, 2010, at 5:28 PM, r.ookie wrote: Well, I had to look further into the documentation to see 'If asp is a

Re: [R] Aspect Ratio

2010-08-19 Thread Spencer Graves
The documentation is not clear. It would help if it had an example like the following: plot(1:2, 1:2/10) plot(1:2, 1:2/10, asp=1) Does looking at these two plots answer the question? Spencer Graves On 8/19/2010 2:36 PM, David Winsemius wrote: On Aug 19, 2010, at

Re: [R] Aspect Ratio

2010-08-19 Thread Joshua Wiley
On Thu, Aug 19, 2010 at 2:46 PM, r.ookie r.oo...@live.com wrote: I'm asking to get people's interpretation and also whether they've encountered situations where it was useful, helpful, etc. In general, it would probably help your responses on this list if you were clearer in the first place

Re: [R] Aspect Ratio

2010-08-19 Thread Ted Harding
Spencer, you came up with your example just as I finished making mine: set.seed(54321); X - rnorm(200) ; Y - 0.25*X+0.25*rnorm(200) ##Compare: plot(X,Y,pch=+,col=blue) ##with: plot(X,Y,pch=+,col=blue,asp=1.0) With R left to choose the X and Y limits by itself, the first plot gives the

Re: [R] Aspect Ratio

2010-08-19 Thread r.ookie
plot(1:3) # usual way to view plot(1:3, asp = 2) # convenient way to apply horizontal compression for visibility plot(1:3, xlim = c(0, 4)) # but if you have information on what the graph looks like, you can manually apply the same horizontal compression Was I going through some sort of gang

Re: [R] Aspect Ratio

2010-08-19 Thread r.ookie
I understand Joshua, it's a way to display the plotted data in a graph. I've been using 'ylim = c()' and 'xlim = c()' so far but it's nice to be aware of 'asp' too. On Aug 19, 2010, at 2:58 PM, Joshua Wiley wrote: On Thu, Aug 19, 2010 at 2:46 PM, r.ookie r.oo...@live.com wrote: I'm asking to

Re: [R] Aspect Ratio

2010-08-19 Thread Gavin Simpson
On Thu, 2010-08-19 at 14:28 -0700, r.ookie wrote: Well, I had to look further into the documentation to see 'If asp is a finite positive value then the window is set up so that one data unit in the x direction is equal in length to asp * one data unit in the y direction' Okay, so in what

Re: [R] Aspect Ratio

2010-08-19 Thread r.ookie
This example definitely clarified a situation where 'asp' is useful/helpful. Thanks! On Aug 19, 2010, at 3:05 PM, (Ted Harding) wrote: Spencer, you came up with your example just as I finished making mine: set.seed(54321); X - rnorm(200) ; Y - 0.25*X+0.25*rnorm(200) ##Compare:

Re: [R] Aspect Ratio

2010-08-19 Thread r.ookie
Thanks for your example as well. Ted's example was exactly what I needed. On Aug 19, 2010, at 3:18 PM, Gavin Simpson wrote: On Thu, 2010-08-19 at 14:28 -0700, r.ookie wrote: Well, I had to look further into the documentation to see 'If asp is a finite positive value then the window is set up

Re: [R] Aspect Ratio

2010-08-19 Thread Spencer Graves
The 'fortunes' package contains the following: library(fortunes) fortune('rtfm') This is all documented in TFM. Those who WTFM don't want to have to WTFM again on the mailing list. RTFM. -- Barry Rowlingson R-help (October 2003) I see two problems with this:

Re: [R] Aspect Ratio

2010-08-19 Thread r.ookie
Well-stated. On Aug 19, 2010, at 4:31 PM, Spencer Graves wrote: The 'fortunes' package contains the following: library(fortunes) fortune('rtfm') This is all documented in TFM. Those who WTFM don't want to have to WTFM again on the mailing list. RTFM. -- Barry Rowlingson R-help (October