[R] Control of vertical spacing in Lattice key text?

Deepayan Sarkar deepayan at stat.wisc.edu
Sat Mar 19 18:10:26 CET 2005


On Tuesday 15 March 2005 17:18, Patrick Connolly wrote:
> I find the key and legend functions in Lattice very useful.  Trouble
> is, now I can see what else I'd like to be able to do with them.
>
> If I put a title on a key, it appears too close to the key itself,
> and if there's a line break in the title (which often happens), the
> leading between the lines is too much.
>
> What I can do is print to a postscript file, then find the lines in
> the postscript file where my text appears and fiddle with the
> postscript code to move the text up or down as I wish.  For single
> plots that's OK, but I'd prefer to be able to do it within R
> especially when I wish to do dozens of them.
>
> Is there something in the documentation I overlooked?

Nope. The space used for the title is currently hard-coded (to be 1.2 
times the height of the title string). It should be easy enough to add 
a new option in draw.key, provided I can think up a good name 
(suggestions welcome).

Deepayan




More information about the R-help mailing list