Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.

This page will contain example plots and the commands that were used to create them using ggplot2. For now little details might be given about what everything exactly means, but you might be able to deduce how to create similar plots of your data given the examples.

See chang_2013_R_graphics_cookbook.pdf for a more details.


No Format
ggplot(offset , aes(x = diameter,y = vessel.segments,colour=as.factor(genotype),fill=as.factor(genotype))) 
+ geom_line(size=1, aes(colour=as.factor(genotype))) 
+ geom_ribbon(data=offset, aes(ymin = vessel.segments-sem,ymax=vessel.segments+sem), alpha=0.4) 
+ scale_colour_manual(values=c("blue", "red","black")) 
+ scale_fill_manual(values=c("blue", "red","black"))