I am working with this dataset[1] and having trouble faceting multiple
plots. How do I go about merging plots on rows 1 and 2 [2] and
faceting by top strip? Each of the column plots share a similar scale
and I want to have them on one plot.
What I have managed to come up with is generated by the code below.
library(ggplot2)
library(reshape2)
dataset <- read.table("dataset.dat", header=TRUE, sep=",", row.names=NULL)
info <- melt(dataset, id.vars=c(1:2))
ggplot(data=info, aes(x=as.factor(W), y=value, group=variable,
shape=variable)) + geom_line() + facet_grid(S ~ variable,
scales="free_y") + scale_y_log10() + theme(axis.text.x =
element_text(angle=90, vjust=0.5))
[1] See attachment (dataset.dat)
[2] See attachment (dataset.png)
Lighton Phiri
http://lightonphiri.org