Skip to content
Back to formatted view

Raw Message

Message-ID: <506AEFF1.2070009@email.uni-kiel.de>
Date: 2012-10-02T13:45:21Z
From: Christof Kluß
Subject: lattice xyplot, get current level
In-Reply-To: <k4eheb$ej9$1@ger.gmane.org>

subj <- levels(subject)
subj[panel.number()]

seems to be a good solution

is there something like panel.legend (instead of panel.text)?

Am 02-10-2012 12:59, schrieb Christof Klu?:
> Hi
> 
> xyplot(y ~ x | subject) plots a separate graph of y against x for each
> level of subject. But I would like to have an own function for each
> level. Something like
> 
> xyplot(y ~ x | subject,
>        panel = function(x,y) {
>          panel.xyplot(x,y)
> 
>          panel.curve(x,y) {
>            # something that dependents on the current subject
>            ...
>          }
>        })
> 
> 
> How I get the current subject? (The current subject is the title of the
> graph, too)
> 
> thx
> Christof
>