Reputation: 53
I am trying to plot a range of values and error bars with ggplot2 with ends but they are not displaying.
I tried varying the scales and error bar width but that did not work
Here is my code
plot5 <- ggplot(alpha_cDNA, aes(x = cDNA, y = ymid, colour = mark)) + geom_point() +
geom_errorbar(aes(ymin = ymin, ymax = ymax), width = 0.2) + theme(axis.text.x = element_text(size = 12)) +
theme(axis.text.y = element_text(size =12)) + scale_color_manual(values = c("chartreuse4", "aquamarine4", "steelblue4", "orchid4", "burlywood4", "gold4", "darkolivegreen4"))
The issue is that the error bar ends (which should be width 0.2) just don't display. I've never had this problem before
Upvotes: 5
Views: 1801
Reputation: 10796
width = 0.2
makes the whiskers 0.2 x-units wide, your x range is in the thousands, you want to increase your width by a few orders of magnitude.
Upvotes: 7