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
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
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
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
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,
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
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
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
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
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
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 =
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
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
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
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)
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
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
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
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 -
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
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:
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
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
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
24 matches
Mail list logo