[R] Background color of symbols in xyplot

2007-08-03 Thread Sébastien
Dear R-users, I am using plot symbols given by pch=21:25 in a xyplot. The background color of these symbols can be defined by 'fill' in the panel argument, however I have a hard time to find how to define the same background color in the key. I tried different options like using the auto.key

Re: [R] Background color of symbols in xyplot

2007-08-03 Thread deepayan . sarkar
On 8/2/07, Sébastien [EMAIL PROTECTED] wrote: Dear R-users, I am using plot symbols given by pch=21:25 in a xyplot. The background color of these symbols can be defined by 'fill' in the panel argument, however I have a hard time to find how to define the same background color in the key. I

Re: [R] Background color of symbols in xyplot

2007-08-03 Thread Sébastien
Thank you very much for your help. I have installed the latest versions of R and lattice are installed, and now the 'fill' argument (instead of bg) gives me what I want. [EMAIL PROTECTED] a écrit : On 8/2/07, Sébastien [EMAIL PROTECTED] wrote: Dear R-users, I am using plot symbols

[R] background color

2007-04-17 Thread yannig goude
hi, I want to add different colors on the background of a classical plot. Each color is associated to an interval of the x axis. example: the background is red on the interval [1,10], blue on [11,20]. I try the rect function but it isn't appropriate for the background. Can any one can

Re: [R] background color

2007-04-17 Thread Petr Klasterecky
What do you mean by background? Maybe this is enough: plot(seq(-3,3,.01), dnorm(seq(-3,3,.01)), type=n, xlab=x, ylab=f(x), main=Normal density) polygon(x=c(-4,0,0,-4), y=c(-1,-1,.5,.5), col=red) polygon(x=c(4,0,0,4), y=c(-1,-1,.5,.5), col=blue) lines(seq(-3,3,.01), dnorm(seq(-3,3,.01)), type=l,

Re: [R] background color

2007-04-17 Thread Gabor Grothendieck
On 4/17/07, yannig goude [EMAIL PROTECTED] wrote: I want to add different colors on the background of a classical plot. Each color is associated to an interval of the x axis. example: the background is red on the interval [1,10], blue on [11,20]. I try the rect function but it isn't

[R] background color behind symbols in legend()

2007-03-05 Thread Nicolas Mazziotta
Hello, I try to display coloured rectangles behind symbols in a legend (as a background): plot(10,10) legend(top, c(text,text2), pch=c(21,22), fill=c(red,green), pt.bg=black) On the resulting graph, the symbol is not centered upon the coloured rectangle. Is there a way to adjust their

[R] background color in strip.custom()

2006-12-04 Thread Sven Garbade
Hi all, how can I change the background color in lattice strips according to a factor level, eg: library(lattice) x - rnorm(100) y - sqrt(x) f - gl(2, 50, c(A, B)) xyplot(y ~ x | f) I like to change the background color of the strips according to the levels in f and tried several things like

Re: [R] background color in strip.custom()

2006-12-04 Thread Duncan Mackay
One way is to use the argument par.settings get the right name names(trellis.par.get()) or str(trellis.par.get()) to find the list names to change then xyplot(y ~ x | f, par.settings = list(strip.background = list(col = c(your colours)) ) Regards Duncan Duncan Mackay

Re: [R] background color in strip.custom()

2006-12-04 Thread Deepayan Sarkar
On 12/4/06, Sven Garbade [EMAIL PROTECTED] wrote: Hi all, how can I change the background color in lattice strips according to a factor level, eg: library(lattice) x - rnorm(100) y - sqrt(x) f - gl(2, 50, c(A, B)) xyplot(y ~ x | f) I like to change the background color of the strips

Re: [R] background color in strip.custom()

2006-12-04 Thread Deepayan Sarkar
On 12/4/06, Duncan Mackay [EMAIL PROTECTED] wrote: One way is to use the argument par.settings get the right name names(trellis.par.get()) or str(trellis.par.get()) to find the list names to change then xyplot(y ~ x | f, par.settings = list(strip.background = list(col =

[R] background color of xyplot

2005-10-09 Thread Marc Bernard
Dear All, I am wondering if there is a way to change the color of the panels of the xyplot (lattice package) from gray to white .. Because the printing of the xyplot's graph is not visible with the gray color ... I've seen the xyplot help but without any success Thanks

Re: [R] background color of xyplot

2005-10-09 Thread ronggui
see ?trellis.device trellis.device(color=F) Depth - equal.count(quakes$depth, number=8, overlap=.1) xyplot(lat ~ long | Depth, data = quakes) will get what you want. === 2005-10-09 22:32:10 您在来信中写道:=== Dear All, I am wondering if there is a way to change the

Re: [R] background color for plotting symbols in 'matplot'

2005-01-19 Thread Uwe Ligges
joerg van den hoff wrote: something like matplot2(matrix(1:6,3,2),matrix(7:12,3,2),pch=21,bg=c(2,3),type='b') Where can we find matplot2? does not yield the expected (at least by me) result: only the points on the first line get (successively) background colors for the plotting symbols, the

Re: [R] background color for plotting symbols in 'matplot'

2005-01-19 Thread joerg van den hoff
thanks for the response. Uwe Ligges wrote: joerg van den hoff wrote: something like matplot2(matrix(1:6,3,2),matrix(7:12,3,2),pch=21,bg=c(2,3),type='b') Where can we find matplot2? oops. that should have been 'matplot' (not 'matplot2'), of course. does not yield the expected (at least by me)

[R] background color for plotting symbols in 'matplot'

2005-01-18 Thread joerg van den hoff
something like matplot2(matrix(1:6,3,2),matrix(7:12,3,2),pch=21,bg=c(2,3),type='b') does not yield the expected (at least by me) result: only the points on the first line get (successively) background colors for the plotting symbols, the second line gets no background color at all for its

[R] Background color Windows device (newbie)

2004-10-01 Thread Jean-Louis Abitbol
Dear R Gurus Just started on R ! Using xYplot from Hmisc (R 1.9, W2K) I get a grey/blue background that I would like to change to white (ie no background) or may be to another color. Tried to do that with par(bg) but only changed the color of the trellis heading. What's the right command to do

RE: [R] Background color Windows device (newbie)

2004-10-01 Thread Liaw, Andy
What you should realize is that xYplot() uses lattice, and that color theme is the default for lattice. trellis.device() has the `theme' argument that you can use to change it. The help page explains how you can change the default: theme: list of components that change the settings of the

Re: [R] Background color Windows device (newbie)

2004-10-01 Thread Chuck Cleland
See the bg argument to trellis.device(). Here is an example: library(Hmisc) library(lattice) trellis.device(width=7, height=5, new = TRUE, col = FALSE, bg = white) dfr - expand.grid(month=1:12, continent=c('Europe','USA'), sex=c('female','male')) set.seed(1) dfr -

Re: [R] Background color(s) for groupedData plot

2003-06-19 Thread Renaud Lancelot
Paul, David A wrote: I've been using par() to check the graphics parameters associated with both plot(fitted linear model) and plot(grouped data object). AFAIK the only differences are in the $cxy, $usr, $xaxp, and $yaxp parameters but the background color for the grouped data plot is grey while

RE: [R] Background color(s) for groupedData plot

2003-06-19 Thread Paul, David A
Thank you both for pointing out that this is a lattice plot (ie, R's version of Trellis graphics) and therefore needs something other than par(). I was able to use IE6.0 to search for trellis and find the relevant commands (after using help.start(), of course). This brings up another question:

Re: [R] Background color(s) for groupedData plot

2003-06-19 Thread Uwe Ligges
Paul, David A wrote: I've been using par() to check the graphics parameters associated with both plot(fitted linear model) and plot(grouped data object). AFAIK the only differences are in the $cxy, $usr, $xaxp, and $yaxp parameters but the background color for the grouped data plot is

Re: [R] Background color(s) for groupedData plot

2003-06-19 Thread Michael A. Miller
Paul, == Paul, David A [EMAIL PROTECTED] writes: Is there a convenient way to decide whether or not the generic plot( ) is going to use regular or trellis plotting? I looked at methods(plot) and didn't find any groupedData plot methods listed, so perhaps this is the

[R] Background color of plot

2003-02-04 Thread Patricia Maforte dos Santos
I'm using the parameters mfrow and mfg to display some graphics(plots) at the same time. Although, because of the parameter mfg, the parameter bg don´t change the background color. What can I do to solve this? Here is the code I'm using... ... i - 1 for(j in 1:4){ for(k in