Re: [R] dotplot legend

2014-12-17 Thread Duncan Mackay
If you want to use lattice then the following should give you some tips Read ?lattice::xyplot testmatrix<-matrix(c(1,2,3,4,3,6,12,24),nrow=4,ncol=2) testylabels<-c('w1','x1','y1','z1') dtf <- data.frame(testmatrix) dtf testmatrix dotplot(X2 ~ X1, dtf) dtf[,1] = factor(dtf[,1]) dotplot(X2 ~ X1, dtf

Re: [R] dotplot legend

2014-12-17 Thread Michael Dewey
On 17/12/2014 12:24, r...@openmailbox.org wrote: Subscribers, For this example: library(lattice) testmatrix<-matrix(c(1,2,3,4,3,6,12,24),nrow=4,ncol=2) testylabels<-c('w1','x1','y1','z1') dotplot(testmatrix, scales=list(y=list(labels=testylabels), xlab=NULL)) legend('bottomright', 'legend', c