Sometimes you may want to create a plot with the following features:
- a point to indicate the mean of a group
- error bars to indicate the standard deviation of the group
- and each group may have subgroups, which are represented by different colors.
In this post, I will show you how to create such a plot using the
ggplot2
package in R.
Read on for the demonstration, as well as fixing a common problem of overlapping data points. H/T R-Bloggers.