directlabels - densityplot - example - iris

library(reshape2)
iris2 <- melt(iris,id="Species")
library(lattice)
p <- densityplot(~value|variable,iris2,groups=Species,scales="free")
top.bumptwice

Label the tops, bump labels up to avoid other labels, then to the side to avoid collisions with points.

direct.label(p,"top.bumptwice")
  
top.bumpup

Label the tops, but bump labels up to avoid collisions.

direct.label(p,"top.bumpup")
  
top.points

Positioning Method for the top of a group of points.

direct.label(p,"top.points")
  
Please contact Toby Dylan Hocking if you are using directlabels or have ideas to contribute, thanks!
Documentation website generated from source code version 2021.2.24 (git revision bb6db07 Mon, 14 Jun 2021 22:38:45 +0530) using inlinedocs.
validate