Skip to content
Prev 318434 / 398503 Next

lattice xyplot point labelling

hi

the bottom panel seems ok so for the top you 
supply a vector of positions that are your 
required positions (name eg posvec) to the panel 
function. may need to do the same for other functions
to access the correct panel there is the ifelse statement

posvec = c(...)

   panel = function(x, y , subscripts,...) {
           pnl = panel.number()
           panel.xyplot(x, y, cex=0.8,...)
           panel.abline(a = 0, b = 1, lty = 2, col ="gray")
           if (pnl == 2){
           panel.text(x, y, labels=tv.ms$inq[subscripts],
                      cex = 0.7, pos=3, offset=1, srt=0, adj=c(1,1))
           } else {
           panel.text(x, y, labels=tv.ms$inq[subscripts],
                      cex = 0.7, pos=posvec, offset=1, srt=0, adj=c(1,1))
           }
           #alternative to the use of panel.text
           #ltext(x=x, y=y, labels=tv.ms$inq[subscripts], pos=1, cex=0.8)
         },

HTh

Duncan

Duncan Mackay
Department of Agronomy and Soil Science
University of New England
Armidale NSW 2351
Email: home: mackay at northnet.com.au
At 22:30 27/02/2013, you wrote: