Thanks Thierry,
I knew there had to be a simpler way, but just could not find it
(facet_wrap() does the trick!).
Just 2 other questions:
- How do I remove the plot titles? I don't find any argument in
facet_wrap() on that...
- How can I add the legend for the outliers?
Thanks again,
Ivan
-
Dear Ivan,
You're making things too complicated.
ggplot(mydata, aes(x = Spot, y = Value)) +
geom_boxplot(aes(colour = Equipment), outlier.colour = "red") +
geom_jitter() +
facet_wrap(~Equipment, scales = "free_y") +
scale_colour_manual(values = c(Leeb = "blue", Shore = "red"))
Best regar
The problem is that you are not actually 'mapping' any variables to
the fill and colour aestethics so ggplot wont produce legends for
those. I'm not sure ggplots are appropiate for what you're trying to
do here but you can sure hack around it a bit, for instance try:
ggplot(tabu, aes(x=weeks, y=T)
3 matches
Mail list logo