Dear all, I'd like to draw a color key beside a graph drawn with xyplot (lattice library). I am aware of the draw.colorkey function (grid library) but don't know how to handle it. Any hint would be appreciated. Renaud -- Dr Renaud Lancelot, v?t?rinaire CIRAD, D?partement Elevage et M?decine V?t?rinaire (CIRAD-Emvt) Programme Productions Animales http://www.cirad.fr/presentation/programmes/prod-ani.shtml (Fran?ais) http://www.cirad.fr/presentation/en/program-eng/prod-ani.shtml (English) ISRA-LNERV tel (221) 832 49 02 BP 2057 Dakar-Hann fax (221) 821 18 79 (CIRAD) Senegal e-mail renaud.lancelot at cirad.fr -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
> Dear all, > > I'd like to draw a color key beside a graph drawn with xyplot (lattice > library). I am aware of the draw.colorkey function (grid library) but > don't know how to handle it. Any hint would be appreciated. > > RenaudI haven't used draw.colorkey in lattice but you could look at map.key in package maptree as a possible alternative. Denis White US EPA, 200 SW 35th St, Corvallis, Oregon, 97333 USA voice: 541.754.4476, email: white.denis at epa.gov web: www.epa.gov/wed/pages/staff/white/ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Do you mean a colorkey as is usually drawn in levelplot (and not key) ? xyplot is not designed to draw color keys directly. You could use the key argument to xyplot to emulate it somewhat (something like key = list(rect = list(col = 1:7), space = "right")) Alternately, you could modify the object produced by xyplot to add a colorkey component, which would be enough to fool print.trellis: foo <- xyplot(<whatever>) foo$colorkey <- list(col = 1:7, at = 1:8, tick.number = 10) print(foo) --- Renaud Lancelot <lancelot at sentoo.sn> wrote:> Dear all, > > I'd like to draw a color key beside a graph drawn with xyplot (lattice > library). I am aware of the draw.colorkey function (grid library) but > don't know how to handle it. Any hint would be appreciated. > > Renaud__________________________________________________ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._