Re: [R] Adding a second Y axis on a dotplot

2015-09-12 Thread Duncan Mackay
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

Re: [R] Adding a second Y axis on a dotplot

2015-09-12 Thread Duncan Mackay
- 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

[R] Adding a second Y axis on a dotplot

2015-09-11 Thread li li
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

Re: [R] Adding a second Y axis on a dotplot

2015-09-11 Thread Jim Lemon
Hi Hanna, Not within lattice, but you could try this: plot(as.numeric(tmp1$lot[tmp1$trt=="trt1"]), tmp1$result[tmp1$trt=="trt1"],xlab="lot", ylab="Values",type="p",axes=FALSE, col="red",pch=1,ylim=c(68,120)) abline(v=1:9,col="lightgray",lty=2) box() library(plotrix)