On Thu, Apr 29, 2010 at 6:15 PM, Santosh wrote:
> Richard,
> Thanks for your email. I am not looking for that kind of plot as you had
> suggested. I would like to see overlaid boxplots. Deepayan had earlier shown
> the method of overlay of boxplots (using panel.groups=panel.bwplot)...
>
> I have s
Richard,
Thanks for your email. I am not looking for that kind of plot as you had
suggested. I would like to see overlaid boxplots. Deepayan had earlier shown
the method of overlay of boxplots (using panel.groups=panel.bwplot)...
I have seen in some packages like ggplot2, where the overlapped plot
Santosh,
continuing with your example, I recommend several functions in the HH
package.
## install.packages("HH") ## needed once, if you don't already have it
require(HH)
tmp <- data.frame(y=rnorm(100),
category=rep(factor(letters[1:5]), each=20),
level=rep(f
ups = which, panel=panel.superpose,
>panel.groups = panel.bwplot,
> par.settings=list(superpose.symbol=list(fill=2:4)), col = "black", pch
> = 16)
>
> -Deepayan
>
> >
> > Without the groups, the fill colors are controlled like this
&g
g; dickywe...@hotmail.com
Subject: Re: [R] Lattice Groups
On Wed, Apr 8, 2009 at 10:36 AM, Lyman, Mark wrote:
> I don't understand your first question, but, since no one else has
> responded I can answer your second question. panel.bwplot, unlike
> panel.xyplot doesn't use panel.superpos
ings=list(box.rectangle=list(fill=2:4)))
>
> Although if you have groups, using the groups argument is probably
> better.
>
> Mark Lyman
>
>
> Message: 41
> Date: Tue, 7 Apr 2009 10:50:33 +0100
> From: Richard Weeks
> Subject: [R] Lattice Groups
> To:
> Message-ID:
>
ups, the fill colors are controlled like this
bwplot(y~x:which, data = df,
par.settings=list(box.rectangle=list(fill=2:4)))
Although if you have groups, using the groups argument is probably
better.
Mark Lyman
Message: 41
Date: Tue, 7 Apr 2009 10:50:33 +0100
From: Richard Weeks
Subject: [R] Lattice
Hi all,
I'm trying to achieve a few things using the lattice package but am failing
miserably.
I am plotting side by side box plots and using a grouping variable, e.g.
cols <- c("Sepal.Width", "Petal.Length", "Petal.Width")
stackedData <- stack(iris[, cols])
df <- data.frame(y = stackedD
Thanks Gabor and Baptiste,
Both your suggestions give me the results I was looking for!
Robert
> CC: r-help@r-project.org
> From: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Subject: Re: [R] Lattice: groups and no groups with panel.superpose
> Date: Sat, 15 Nov 2008 16:59:3
Hi,
I think the following code should do what you want,
xyplot(yvar~year|week,data=df,layout = c(4, 5),
type='p',
groups = temp ,
panel = function(x, y, ...) {
panel.superpose(x, y,
Dear R listers,
I am trying to create a lattice plot with independent regression lines per group
for each panel, plus one overall regression line per panel. I succeed in having
the separate regression lines for each group per panel, but I can't figure out
how to add the overall regression line o
11 matches
Mail list logo