[R] Leading in line-wrapped Lattice value and panel labels

Deepayan Sarkar deepayan.sarkar at gmail.com
Thu Sep 8 20:20:09 CEST 2005


On 9/7/05, Paul Murrell <p.murrell at auckland.ac.nz> wrote:
> Hi
> 
> 
> Deepayan Sarkar wrote:
>  > On 9/7/05, Tim Churches <tchur at optushome.com.au> wrote:
>  >
>  >> Version 2.1.1 Platforms: all
>  >>
>  >> What is the trellis parameter (or is there a trellis parameter) to
>  >> set the leading (the gap between lines) when long axis values
>  >> labels or panel header labels wrap over more than one line? By
>  >> default, there is a huge gap between lines, and much looking and
>  >> experimentation has not revealed to me a suitable parameter to
>  >> adjust this.
>  >>
>  >
>  >
>  > There is none. Whatever grid.text does happens.
> 
> 
> grid does have a "lineheight" graphical parameter.  For example,
> 
> library(grid)
> grid.text("line one\nlinetwo",
>            x=rep(1:3/4, each=3),
>            y=rep(1:3/4, 3),
>            gp=gpar(lineheight=1:9/2))
> 
> Could you add this in relevant places in trellis.par Deepayan?

I will (don't know how soon). The description in ?gpar is not very
informative though:

       lineheight  The height of a line as a multiple of the size of text

(or maybe it's a standard term in typography that I'm not familiar with).

Deepayan




More information about the R-help mailing list