Comparing two populations using different graph types
October 5th, 2007I think the title says it all. If you have two populations such as “Treatment” and “Control”, what type of graphs can you use to compare the two? Have a look at the examples, then pick the corresponding R code.
All of the charts come from either excellent the lattice package, or the superb ggplot2 package. The code should also work for multiple populations as well.
lattice
Box plot

Violin plot

Density plot

ggplot2
Box and whisker plot

Box and whisker plot with points

Density plot

Histogram plot

October 6th, 2007 at 2:19 pm
Just a couple of suggestions on “competitive” platforms:
1. With Python, matplotlib is amazing, and very easy to use. The 3D graphics are very cool as they are interactive (one can rotate/zoom them, no code involved). It seems to produce publication quality graphics by default.
). No 3D, though.
2. With Java, there is JFreeChart. Dreadful to use (hey, its a Java API, it could not be easy), but with lots of options and flexibility (hey, its Java…
October 7th, 2007 at 12:43 pm
Nice summary. I wish I’d had some formal training in R; it’s something I use occasionally and it feels like I’m relearning the basics every time I go back to it. I often feel like there’s almost nothing it can’t do, from basic stats and plotting to complex custom scripts for bioinformatics, but good how-tos and tutorials are few and far between.
October 8th, 2007 at 3:42 pm
I am still stuck with matlab plot
October 8th, 2007 at 9:54 pm
Matlab? EXCEL FTW LOL!
Here’s some R tutorials.
October 9th, 2007 at 2:16 pm
Heheheh, I am getting in love with demo(smooth) now!