Hi see https://stat.ethz.ch/pipermail/r-help/2007-June/134524.html
to get you started. Its toolate or too early here Regards Duncan Duncan Mackay Department of Agronomy and Soil Science University of New England Armidale NSW 2351 Email: home: mac...@northnet.com.au -----Original Message----- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of li li Sent: Saturday, 12 September 2015 03:30 To: r-help Subject: [R] Adding a second Y axis on a dotplot Hi all, I plotted a dotplot based on the data below and code below. I would like to add another yaxis on the right with a different col, different tickmarks and a different label. Can anyone give some help?Thanks very much!! Hanna > tmp1 result lot trt trtsymb trtcol 1 98 lot1 trt1 1 blue 2 99 lot2 trt1 1 blue 3 98 lot3 trt1 1 blue 4 100 lot4 trt1 1 blue 5 100 lot5 trt1 1 blue 6 101 lot6 trt1 1 blue 7 101 lot7 trt1 1 blue 8 99 lot8 trt1 1 blue 9 100 lot9 trt1 1 blue 10 94 lot1 trt2 16 red 11 105 lot2 trt2 16 red 12 87 lot3 trt2 16 red 13 119 lot4 trt2 16 red 14 96 lot5 trt2 16 red 15 113 lot6 trt2 16 red 16 106 lot7 trt2 16 red 17 71 lot8 trt2 16 red 18 95 lot9 trt2 16 red library(lattice) dotplot(result ~ lot, tmp1, cex=1.1, ylab = "values", xlab="lot", jitter.y = F, aspect=1.0, pch=tmp1$trtsymb, col=tmp1$trtcol, scales=list(rot=30), main="", key = list(text = list(labels = c("trt1", "trt2"),cex=c(0.9,0.9)), points = list(pch =c(1,12), col =c("blue", "red")), space = "right")) ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.