[R] 'symbols' not drawing correctly in the 'y' dimension
David Carlson
dcarlson at tamu.edu
Thu May 9 23:12:51 CEST 2013
Change the first line to
plot(c(0, 2), c(0, 2), asp=1)
That will set the aspect ratio between the vertical and horizontal axes to
be equal.
-------------------------------------
David L Carlson
Associate Professor of Anthropology
Texas A&M University
College Station, TX 77840-4352
-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On
Behalf Of Damián Cirelli
Sent: Thursday, May 9, 2013 3:58 PM
To: r-help at r-project.org
Subject: [R] 'symbols' not drawing correctly in the 'y' dimension
Hello nice R people,
I'm struggling with the following code:
plot(c(0, 2), c(0, 2))
symbols(1, 1, circles=0.5, add=T, inches=F) symbols(1, 1, squares=1, add=T,
inches=F) abline(v=c(0.5, 1.5), lty=2) abline(h=c(0.5, 1.5), lty=2)
The a-b lines in the vertical direction coincide perfectly with the borders
of both the circle and the square drawn with 'symbols'.
However, the a-b lines in the horizontal direction, clearly show that the
circle is larger in the y-dimension than radius 0.5; same with the square.
Using 'locator', shows the "y-radius" closer to 0.56
Any ideas what could be causing this? I have tried this in 3 different
machines,same result. Two are running Ubuntu with the R from the repo, one
is running Slackware with R version 2.15.3 compiled from source.
Any help much appreciated,
Damian
______________________________________________
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.
More information about the R-help
mailing list