In a similiar manner with additions
dat <- data.frame(x=x,y=y,z=z)
dotplot(y~z+x,data = dat, pch = 16, type= c("p","g"))
HTH
Duncan
Duncan Mackay
Department of Agronomy and Soil Science
University of New England
Armidale NSW 2351
Email: home: [email protected]
At 07:00 22/06/2013, you wrote:
Maybe something like this?
dataset <- data.frame(x=c(y, y), y=c(x, z), g=rep(1:2, each=58))
dotplot(x~y, groups=g, data=dataset)
-------------------------------------
David L Carlson
Associate Professor of Anthropology
Texas A&M University
College Station, TX 77840-4352
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Andras Farkas
Sent: Friday, June 21, 2013 2:43 PM
To: [email protected]
Subject: [R] overlay 2 dot plots
Dear All,
wonder if you would provide your insights on the following: the
code:
library(lattice)
y <-c(1:58)
x <-runif(58,5,10)
z <-runif(58,8,12)
dataset <-data.frame(y,x)
dotplot(y ~ x, data = dataset)
dataset <-data.frame(y,z)
dotplot(y~z,data = dataset,col="red")
I would like to overlay the two plots, but no success so far, I
tryed the add=TRUE command, but does not seem to work with this
plot...
appreciate the insights,
Andras
______________________________________________
[email protected] 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.
______________________________________________
[email protected] 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.
______________________________________________
[email protected] 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.