Skip to content

lattice key subtitle

2 messages · Alexandru Dumitrescu, Deepayan Sarkar

2 days later
#
On Tue, Oct 26, 2010 at 2:49 AM, Alexandru Dumitrescu
<alexandru.dumitrescu at gmail.com> wrote:
None specifically for that purpose, but latticeExtra does have a
mergedTrellisLegendGrob() function that may help:

mylegend <-
mergedTrellisLegendGrob(list(fun = draw.key,
                             args = list(key = simpleKey(month.name[1:3],
                                                         title = "Months"))),
                        list(fun = grid::textGrob,
                             args = list("subtitle")),
                        vertical = TRUE)

xyplot(1 ~ 1,
       legend = list(top = list(fun = mylegend)))

mergedTrellisLegendGrob() was written as a helper function for
c.trellis(), but the plan is to eventually make it a bit more general
tool for combining legends.

-Deepayan