When I create a dotplot in lattice, I frequently observe overplotting
of the labels along the vertical axis.  On my screen, this illustrates
overplotting of the letters:

windows()
reps=6
dat=data.frame(let=rep(letters,each=reps), grp=rep(1:reps, 26),
  y=runif(26*reps))
dotplot(let~y|grp, dat)

Is there a way to automatically scale the labels so that they are not
over-plotted?

I currently do something like this:
Calculate or guess the number of panel rows: NumPanelRows
cexLab <- min(1, .9*par()$pin[2]/
              (nlevels(dat$let)*NumPanelRows*strheight("A",units="in")))
dotplot(..., scales=list(y=list(cex=cexLab))

Is there an easier way?

Is there a function that I can call which calculates the layout of the
panels that will be used in the dotplot?

Any tips will be appreciated.

K Wright

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to