[R] How to auto-scale cex of y-axis labels in lattice dotplot?

Kevin Wright kw.statr at gmail.com
Thu Jul 26 05:12:25 CEST 2007

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:

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

Is there a way to automatically scale the labels so that they are not

I currently do something like this:
Calculate or guess the number of panel rows: NumPanelRows
cexLab <- min(1, .9*par()$pin[2]/
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

More information about the R-help mailing list