Dear All, I've been playing with pty, and it seems it does not produce square plots as it is expected to (or at least as I expect it to). Consider this simple example: par(pty="s"); plot(1:10, 1:10) This should produce a square plot, right? Well, if you have a look at the graph, it is not square! So, maybe the limits? par(pty="s"); plot(1:10, 1:10, xlim = c(0,11), ylim=c(0,11)) No, again not. So let's try and help to equalize everything, just to be sure: windows(6, 6); par(mar=c(3, 3, 3, 3), pty="s"); plot(1:10, 1:10, xlim = c(0, 11), ylim = c(0, 11)) Again not! pty = "s" is to generate a square plotting region, and it does not seem to do that. Where is my mistake? Thanks in advance, Marcin
Plot's aspect ratio and pty
5 messages · Uwe Ligges, Marcin Kozak, Brian Ripley
It does for me under R-2.12.0 32-bit on Windows with the windows() device, so: Which version of R, which OS, which device do you use? Uwe Ligges
On 13.12.2010 07:30, Marcin Kozak wrote:
Dear All, I've been playing with pty, and it seems it does not produce square plots as it is expected to (or at least as I expect it to). Consider this simple example: par(pty="s"); plot(1:10, 1:10) This should produce a square plot, right? Well, if you have a look at the graph, it is not square! So, maybe the limits? par(pty="s"); plot(1:10, 1:10, xlim = c(0,11), ylim=c(0,11)) No, again not. So let's try and help to equalize everything, just to be sure: windows(6, 6); par(mar=c(3, 3, 3, 3), pty="s"); plot(1:10, 1:10, xlim = c(0, 11), ylim = c(0, 11)) Again not! pty = "s" is to generate a square plotting region, and it does not seem to do that. Where is my mistake? Thanks in advance, Marcin
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
R-11.1 on both 32-bit and 64-bit on Windows with the windows() device. Best Marcin 2010/12/13 Uwe Ligges <ligges at statistik.tu-dortmund.de>:
It does for me under R-2.12.0 32-bit on Windows with the windows() device, so: Which version of R, which OS, which device do you use? Uwe Ligges On 13.12.2010 07:30, Marcin Kozak wrote:
Dear All, I've been playing with pty, and it seems it does not produce square plots as it is expected to (or at least as I expect it to). Consider this simple example: par(pty="s"); plot(1:10, 1:10) This should produce a square plot, right? Well, if you have a look at the graph, it is not square! So, maybe the limits? par(pty="s"); plot(1:10, 1:10, xlim = c(0,11), ylim=c(0,11)) No, again not. So let's try and help to equalize everything, just to be sure: windows(6, 6); par(mar=c(3, 3, 3, 3), pty="s"); plot(1:10, 1:10, xlim = c(0, 11), ylim = c(0, 11)) Again not! pty = "s" is to generate a square plotting region, and it does not seem to do that. Where is my mistake? Thanks in advance, Marcin
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
On 13.12.2010 11:29, Marcin Kozak wrote:
R-11.1
This one does not exist. Please try R-2.12.0 (but it also worked with R-2.11.1 if you meant that). My guess is that you are confusing plotting region with device region. In order to get a squared device region, you have to ask the device function for a squared region. Best, Uwe Ligges on both 32-bit and 64-bit on Windows with the windows() device.
Best Marcin 2010/12/13 Uwe Ligges<ligges at statistik.tu-dortmund.de>:
It does for me under R-2.12.0 32-bit on Windows with the windows() device, so: Which version of R, which OS, which device do you use? Uwe Ligges On 13.12.2010 07:30, Marcin Kozak wrote:
Dear All, I've been playing with pty, and it seems it does not produce square plots as it is expected to (or at least as I expect it to). Consider this simple example: par(pty="s"); plot(1:10, 1:10) This should produce a square plot, right? Well, if you have a look at the graph, it is not square! So, maybe the limits? par(pty="s"); plot(1:10, 1:10, xlim = c(0,11), ylim=c(0,11)) No, again not. So let's try and help to equalize everything, just to be sure: windows(6, 6); par(mar=c(3, 3, 3, 3), pty="s"); plot(1:10, 1:10, xlim = c(0, 11), ylim = c(0, 11)) Again not! pty = "s" is to generate a square plotting region, and it does not seem to do that. Where is my mistake? Thanks in advance, Marcin
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
On Mon, 13 Dec 2010, Uwe Ligges wrote:
It does for me under R-2.12.0 32-bit on Windows with the windows() device, so: Which version of R, which OS, which device do you use?
Since (s)he used windows() we know the OS. But I think one possible explanation is on the help page, arguments 'xpinch' and 'ypinch': most likely this is one of those devices with a mendacious Windows driver. Of course. we simply do not kwow what (s)her saw, and it is possible that this is simply a misunderstanding of 'plot region'.
Uwe Ligges On 13.12.2010 07:30, Marcin Kozak wrote:
Dear All, I've been playing with pty, and it seems it does not produce square plots as it is expected to (or at least as I expect it to). Consider this simple example: par(pty="s"); plot(1:10, 1:10) This should produce a square plot, right? Well, if you have a look at the graph, it is not square! So, maybe the limits? par(pty="s"); plot(1:10, 1:10, xlim = c(0,11), ylim=c(0,11)) No, again not. So let's try and help to equalize everything, just to be sure: windows(6, 6); par(mar=c(3, 3, 3, 3), pty="s"); plot(1:10, 1:10, xlim = c(0, 11), ylim = c(0, 11)) Again not! pty = "s" is to generate a square plotting region, and it does not seem to do that. Where is my mistake? Thanks in advance, Marcin
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595