Patrick Connolly
2005-Mar-15 23:18 UTC
[R] Control of vertical spacing in Lattice key text?
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? TIA -- Patrick Connolly HortResearch Mt Albert Auckland New Zealand Ph: +64-9 815 4200 x 7188 ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~ I have the world`s largest collection of seashells. I keep it on all the beaches of the world ... Perhaps you`ve seen it. ---Steven Wright ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~
Deepayan Sarkar
2005-Mar-19 17:10 UTC
[R] Control of vertical spacing in Lattice key text?
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