Hi, Peter,

Thanks. This is exactly what I am looking for! Just a little concern. Since
there are so many parameters in the trellis.par, how do we even know there
is one that can do what we want? The documentation does not really have
that much details.

Jun

On Mon, Apr 16, 2012 at 4:29 PM, Peter Ehlers <ehlers@ucalgary.ca> wrote:

> On 2012-04-16 08:51, David Winsemius wrote:
>
>>
>> On Apr 16, 2012, at 11:43 AM, Jun Shen wrote:
>>
>>  Dear list,
>>>
>>> As the title indicates if I draw the legend outside of the plot, how
>>> do I
>>> adjust the distance between the legend and the plot? The default
>>> setting is
>>> too close. Thanks.
>>>
>>
>>   From the help page:
>>
>> "just
>> A character or numeric vector of length one or two giving horizontal
>> and vertical justification for the placement of the legend. See
>> grid.layout for more precise details."
>>
>>
>>
> I would have a look at the layout.heights trellis parameters and set
> these to suit - in this case probably just the xlab.key.padding value.
>
> Look at the list of parameters with
>
>  trellis.par.get("layout.**heights")
>
> # (or wrap this in str() for a briefer output).
>
> Then include a par.settings argument in the xyplot call:
>
>  xyplot( 1 ~ 1,
>         par.settings = list( layout.heights = list(
>              xlab.key.padding = 5 )),
>         key = list( .... etc
>
>
> Peter Ehlers
>
>
>
>>
>>
>>
>>> Here is the sample code I have
>>>
>>> ==============================**============================
>>> xyplot
>>> (1~1,key=list(space='bottom',**columns=2,text=list(c('a','b',**
>>> 'c','d')),
>>> lines
>>> =list(lwd=2,pch=c(1,1,2,2),**cex=1.2,col=c(1,2,3,4),type=c(**'p','l')))
>>> )
>>>
>>> Jun
>>>
>>>        [[alternative HTML version deleted]]
>>>
>>> ______________________________**________________
>>> R-help@r-project.org mailing list
>>> https://stat.ethz.ch/mailman/**listinfo/r-help<https://stat.ethz.ch/mailman/listinfo/r-help>
>>> PLEASE do read the posting guide http://www.R-project.org/**
>>> posting-guide.html <http://www.R-project.org/posting-guide.html>
>>> and provide commented, minimal, self-contained, reproducible code.
>>>
>>
>> David Winsemius, MD
>> West Hartford, CT
>>
>> ______________________________**________________
>> R-help@r-project.org mailing list
>> https://stat.ethz.ch/mailman/**listinfo/r-help<https://stat.ethz.ch/mailman/listinfo/r-help>
>> PLEASE do read the posting guide http://www.R-project.org/**
>> posting-guide.html <http://www.R-project.org/posting-guide.html>
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
>

	[[alternative HTML version deleted]]

