Re: [R] Constructing an additional key inside of a lattice panel

2011-08-18 Thread Felix Andrews
'corner' is not a valid name for a component of 'legend'. See ?xyplot Try xyplot(1 ~ 1, legend = list(inside = list(fun="draw.key", args = list( key = list( text = list(month.name[1:2]), lines = list(lty = 1:2) ), draw = TRUE ),

Re: [R] Constructing an additional key inside of a lattice panel

2011-08-18 Thread Fredrik Karlsson
Dear Deepayan, Thank you for your quick and enlightening reply. I'll try making a modifies version of the two functions and see what I end up with.. However, out of pure curiosity, what is wrong with the "legend" I constructed below: legend=list(corner=list( f

Re: [R] Constructing an additional key inside of a lattice panel

2011-08-17 Thread Deepayan Sarkar
On Tue, Aug 16, 2011 at 4:35 PM, Fredrik Karlsson wrote: > Hi, > > I would like to add an additional key inside of a panel based on a factor > that is not the "groups" argument. > I've tried using the panel.key function in latticeExtras, but I cannot get > the line types the way I want it. > > Usi

Re: [R] Constructing an additional key inside of a lattice panel

2011-08-17 Thread Fredrik Karlsson
Dear list, following up on my own post, I have now started trying constructing a "legend" argument to xyplot that would work, based on the examples in Sarkar's book. I'm now at a state where I have a legend that does not throw an error, but no legend is displayed: legend=list(corner=

[R] Constructing an additional key inside of a lattice panel

2011-08-16 Thread Fredrik Karlsson
Hi, I would like to add an additional key inside of a panel based on a factor that is not the "groups" argument. I've tried using the panel.key function in latticeExtras, but I cannot get the line types the way I want it. Using my factor myGroups, I've tried this: panel.key(text=levels(myGroups)