directlabels - densityplot - Positioning Method - bottom.points

Positioning Method for the bottom of a group of points.

bottom.points <-
  gapply.fun(transform(d[which.min(d$y),],hjust=0.5,vjust=1))
chemscore

chemscore

data(Chem97,package="mlmRev")
library(lattice)
p <- densityplot(~gcsescore|gender,Chem97,
            groups=factor(score),layout=c(1,2),
            n=500,plot.points=FALSE)
direct.label(p,"bottom.points")
  
iris

iris

library(reshape2)
iris2 <- melt(iris,id="Species")
library(lattice)
p <- densityplot(~value|variable,iris2,groups=Species,scales="free")
direct.label(p,"bottom.points")
  
loci

loci

loci <- data.frame(ppp=c(rbeta(800,10,10),rbeta(100,0.15,1),rbeta(100,1,0.15)),
                   type=factor(c(rep("NEU",800),rep("POS",100),rep("BAL",100))))
library(ggplot2)
p <- qplot(ppp,data=loci,colour=type,geom="density")
direct.label(p,"bottom.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 edd0c5b Mon, 28 Jun 2021 10:54:29 +0530) using inlinedocs.
validate