When attempting to adjust the font size in directlabels
, using list(cex=2)
, the function undesirably adds labels to every single point.
library(lattice)
library(directlabels)
foo <- data.frame(x=1:10, y=c(1:5, (1:5)^2), z=c(1:10))
direct.label( xyplot( y + z ~ x, foo, type=c('l','g') ),
list(cex=2) )
I'd prefer the default label placement (with one label per group) that comes with the ordinary call:
direct.label( xyplot( y + z ~ x, foo, type=c('l','g') ) )
Specifying a position method like first.points
below, gives the desired one label per group, but this is not the same default label placement method I am after.
direct.label( xyplot( y + z ~ x, foo, type=c('l','g') ),
list("first.points", cex=2) )
Does anyone know which which position method reproduces the default automatic placement method? Or is there another way to change label font size without specifying the position method?