Re: [R] How to overlay lines and rectangles in lattice plot key

2016-12-29 Thread sbihorel
Thanks to all the persons who replied, I was hoping for a quick "grid-free" solution but I guess it is not Christmas time anymore :D Grid coding it is. On 12/29/2016 12:13 AM, Richard M. Heiberger wrote: Yes, but it will probably require work. I think you will need to write a grob that doe

Re: [R] How to overlay lines and rectangles in lattice plot key

2016-12-28 Thread Duncan Mackay
actor = 5, legend = list(right = list(fun = XY04.fmG)) ) Duncan -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Duncan Mackay Sent: Thursday, 29 December 2016 18:21 To: R Subject: Re: [R] How to overlay lines and rectangles in lattice plot key Hi

Re: [R] How to overlay lines and rectangles in lattice plot key

2016-12-28 Thread Duncan Mackay
nt instead of 2 or 3. The OP needs to change the format and fix the heights of the rectangles etc. I also fixed the colour vectors had j instead of k Duncan -Original Message- From: Duncan Mackay [mailto:dulca...@bigpond.com] Sent: Thursday, 29 December 2016 16:17 To: R Subject: RE: [R]

Re: [R] How to overlay lines and rectangles in lattice plot key

2016-12-28 Thread Richard M. Heiberger
; > Have a look at https://stat.ethz.ch/pipermail/r-help/2005-April/069459.html > and the following emails on the thread. > > Regards > > Duncan > > Duncan Mackay > Department of Agronomy and Soil Science > University of New England > Armidale NSW 2351 > Email:

Re: [R] How to overlay lines and rectangles in lattice plot key

2016-12-28 Thread Duncan Mackay
wing emails on the thread. Regards Duncan Duncan Mackay Department of Agronomy and Soil Science University of New England Armidale NSW 2351 Email: home: mac...@northnet.com.au -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of sbihorel Sent: Thursday, 29 D

Re: [R] How to overlay lines and rectangles in lattice plot key

2016-12-28 Thread Richard M. Heiberger
Yes, but it will probably require work. I think you will need to write a grob that does what you want and then use the grob in a legend statement in the xyplot. Start with the 'legend' argument to xyplot (about line 940 in ?xyplot). You will probably need to work directly with grid functions and

Re: [R] How to overlay lines and rectangles in lattice plot key

2016-12-28 Thread David Winsemius
> On Dec 28, 2016, at 6:50 PM, sbihorel > wrote: > > Hi, > > I would like to create a custom key for a lattice xyplot in which line > elements are displayed on top of rectangle elements. In the example code > below, the lines and rectangles are shown side by side (the legend itself is > mea

[R] How to overlay lines and rectangles in lattice plot key

2016-12-28 Thread sbihorel
Hi, I would like to create a custom key for a lattice xyplot in which line elements are displayed on top of rectangle elements. In the example code below, the lines and rectangles are shown side by side (the legend itself is meaningless, but that is not the point). Is there a way to overlay t