haha Paul,


It's important not only to post code, but also to make sure that other
> people can run it (i.e., include real data or have the code generate
> data or use one of R's predefined data sets).


Oh, I hadn't thought of using the predefined datasets, thats a good idea!

Also, isn't this "next time" ? :)


By next time I meant, when I ask a question in the future, I didn't think
you'd respond!

So here is some code!

library(reshape)
library(ggplot2)

theme_t <- list(grid.fill="white",grid.colour="lightgrey",background.colour=
"black",axis.colour="dimgrey")
ggtheme(theme_t)

grp <-
c(2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3)
time <-
c(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2)
cc <- c(0.7271,0.7563,0.6979,0.8208,0.7521,0.7875,0.7563,0.7771,0.8208,
0.7938,0.8083,0.7188,0.7521,0.7854,0.7979,0.7583,0.7646,0.6938,0.6813,0.7708
,0.7375,0.8104,0.8104,0.7792,0.7833,0.8083,0.8021,0.7313,0.7958,0.7021,
0.8167,0.8167,0.7583,0.7167,0.6563,0.6896,0.7333,0.8208,0.7396,0.8063,0.7083
,0.6708,0.7292,0.7646,0.7667,0.775,0.8021,0.8125,0.7646,0.6917,0.7458,0.7833
,0.7396,0.7229,0.7708,0.7729,0.8083,0.7771,0.6854,0.8417,0.7667,0.7063,0.75,
0.7813,0.8271,0.7896,0.7979,0.625,0.7938,0.7583,0.7396,0.7583,0.7938,0.7333,
0.7875,0.8146)

data <- as.data.frame(cbind(time,grp,cc))
data$grp <- factor(data$grp,labels=c("Group A","Group B"))
data$time <- factor(data$time,labels=c("Pre-test","Post-test"))
boxplot <- qplot(grp, cc, data=data, geom="boxplot",
orientation="horizontal", ylim=c(0.5,1), main="Hello World!", xlab="Label
X", ylab="Label Y", facets=.~time, colour="red", size=2)
boxplot + geom_jitter(aes(colour="steelblue")) + scale_colour_identity() +
scale_size_identity()
grid.gedit("ylabel", gp=gpar(fontsize=16))


> There's a book that provides a full explanation and the (basic) grid
> chapter is online (see
> http://www.stat.auckland.ac.nz/~paul/RGraphics/rgraphics.html)


Awesome, I'll check that out.

Yep, the facilities for investigating the viewport and grob tree are
> basically inadequate.  Based on some work Hadley did for ggplot, the
> development version of R has a slightly better tool called grid.ls()
> that can show how the grob tree and the viewport tree intertwine.  That
> would allow you to see which viewport each grob was drawn in, which
> would help you, for example, to know which viewport you had to go to to
> replace a rectangle you want to remove.


okie dokie, I'm ready to be amazed! hehe.
emilio

	[[alternative HTML version deleted]]

