On 8/7/09, boris.vasil...@forces.gc.ca <boris.vasil...@forces.gc.ca> wrote:
> Dear R-users,
>
>  I am looking for suggestions on how to control the line-height for
>  multi-line labels in lattice dotplot.
>
>  In particular, in the dotplot produced by
>
>  library(lattice)
>  aa <- c('A'=10,'B\nb'=20,'C'=30)
>  dotplot(aa)
>
>  I would like to control the vertical separation between 'B' and 'b' in
>  the second label on the y-axis.
>
>  For multi-line axes labels, line height is controlled by the
>  'lineheight' elements of the 'par.ylab.text' and 'par.xlab.tex' lists
>  provided by trellis.par.get().  However, 'lineheight' is not available
>  in 'axis.text'  list retuned by trellis.par.get().
>
>  Does lattice provided a 'lineheight' parameter to control line-heights
>  in axis labels?

No, but setting it globally as a grid parameter seems to work:

dotplot(aa, par.settings = list(grid.pars = list(lineheight = 2)))

-Deepayan

______________________________________________
R-help@r-project.org 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