Skip to content
Back to formatted view

Raw Message

Message-ID: <431EE693.60109@pdf.com>
Date: 2005-09-07T13:09:39Z
From: Sundar Dorai-Raj
Subject: Lattice key seems to ignore the key list
In-Reply-To: <20050907045440.GA12344@hortresearch.co.nz>

Patrick Connolly wrote:
> I've never had this problem before and can't see what could be
> different from other times I've used keys with lattice.
> 
> 
> 
> It appears that auto.key is being taken as TRUE when I specify a key
> list.  The list I specify seems to be ignored.
> 
> Where can I place a browser to figure out what is going on?
> 
> Having made a list key.symbol from trellis.par.get, and specified a
> scales list and a between list, and a formula object (form), I use
> xyplot like this:
> 
> xyplot(form, data = xx, groups = Entry, layout = c(8,8, 1), 
>                 par.strip.text = list(cex = .65), between = between,
>                 scales = scales,
>                 panel = function(x, y, ...)
>                   panel.superpose(x, y, ...),
>                 key = list(points = Rows(key.symbol, 1:4),
>                   text = list(levels(xx$Entry),
>                     space = "right", columns = 1))
>                 )
> 
> What is implied in there that would set auto.key to TRUE?  The space
> and columns part of the list seems to be ignored and the autokey
> values substituted.  
> 
> Ideas, please.
> 
> Thanks.
> 

Hi, Patrick,

You have "space" and "column" in your "text" list. I.e.

text = list(levels(xx$Entry), space = "right", columns = 1))

This should be

text = list(levels(xx$Entry)), space = "right", columns = 1)

Note the placement of the parantheses.

--sundar