PtitBleu
2011-Nov-10 16:09 UTC
[R] newbie's question : xyplot legend with a white background
Hello, Sorry in advance for adding a silly question on this forum but I haven't found the right keywords to find a solution to this basic problem. I'm just looking a way to have a white background behind the legend to hide the grid. Thanks in advance. The silly example for my silly question: xyplot(1~1, panel = function(x,y, ...) { panel.xyplot(x,y) panel.abline(v=seq(0,1.4,by=0.1)) panel.abline(h=seq(0,1.4,by=0.1)) } ,key=list(x=0.2, y=0.88, points=list(col=c("red","green"),pch=20, cex=2), text=list(c("aaaaaaaaa","zzzzzzzzz"))) ) -- View this message in context: http://r.789695.n4.nabble.com/newbie-s-question-xyplot-legend-with-a-white-background-tp4024152p4024152.html Sent from the R help mailing list archive at Nabble.com.
Dennis Murphy
2011-Nov-10 18:44 UTC
[R] newbie's question : xyplot legend with a white background
Hi: Add a background = 'color' argument to key(): library('lattice') xyplot(1~1, panel = function(x,y, ...) { panel.xyplot(x,y) panel.abline(v=seq(0,1.4,by=0.1)) panel.abline(h=seq(0,1.4,by=0.1)) } ,key = list (x=0.2, y=0.88, points = list(col=c("red","green"),pch=20, cex=2), text=list(c("aaaaaaaaa","zzzzzzzzz")), background = 'white') ) Dennis On Thu, Nov 10, 2011 at 8:09 AM, PtitBleu <ptit_bleu at yahoo.fr> wrote:> Hello, > > Sorry in advance for adding a silly question on this forum but I haven't > found the right keywords to find a solution to this basic problem. > I'm just looking a way to have a white background behind the legend to hide > the grid. > > Thanks in advance. > > > The silly example for my silly question: > > xyplot(1~1, > ? ? ? panel = function(x,y, ...) { > ? ? ? ? ? panel.xyplot(x,y) > ? ? ? ? ? ? ? ? ? panel.abline(v=seq(0,1.4,by=0.1)) > ? ? ? ? ? ? ? ? ? panel.abline(h=seq(0,1.4,by=0.1)) > ? ? ? ? ? ? ? ? } > ,key=list(x=0.2, y=0.88, points=list(col=c("red","green"),pch=20, cex=2), > text=list(c("aaaaaaaaa","zzzzzzzzz"))) > ) > > > -- > View this message in context: http://r.789695.n4.nabble.com/newbie-s-question-xyplot-legend-with-a-white-background-tp4024152p4024152.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >
Seemingly Similar Threads
- file refresh on windows 98 client
- Problem with long number (from character to numeric class)
- I want to display my numbers for incoming calls when some one dials my number from any where
- continuous key press results in core dump (PR#331)
- Defunct / zombie AGI after some execution time