[R] Two bwplots in one single graph
Deepayan Sarkar
deepayan.sarkar at gmail.com
Tue Feb 19 17:42:19 CET 2008
On 2/19/08, Tom Cohen <tom.cohen78 at yahoo.se> wrote:
> Dear list,
>
> With the below codes, I got 8 bwplots but I would like to put 2 bwplots in one single graph so that instead of 8 separate bwplots I would have 4 graphs, each contains 2 bwplots. How can I do that?
>
> Another question is how do I add the mean as a point to each boxplot in the bwplot but also keeping the median line.
>
> for (i in 1:length(dat)){
> windows()
> with(dat[[i]], print(bwplot(value ~ time | sex + age , scales = list(x = list(rot = 45)),
> ylab = list(label = paste(sname[i],"-value",sep=""), cex = 0.8),
> xaxis = list(cex = 0.6),
> panel = function(x, y){panel.bwplot(x, y, pch
> = '|',horiz=F,stats = boxplot.stats, fill = "khaki2", varwidth = T)})))
> }
Your question assumes that we are familiar with your data, which we
are not. As the footer says, please "provide commented, minimal,
self-contained, reproducible code."
-Deepayan
More information about the R-help
mailing list