Hi ggplot users,
I'd like to ask that how to plot grouped bar charts with error bars. For the dataframe below, A, B, C belong to group 1, A2, B2, C2 belong to group 2, etc. In each figure, there are several such groups on x-axis. In each group, there are three bars, while each bar represents the median values in A, B, C, or A2, B2, C2, etc. In each group, bar A is in the y-direction, while bars B and C are in the negative y-direction. The error bars are also shown on each bar variable to summarize all the values from row1 to row10 for example.
Also, though A, and B & C are in the two directions, they share the same x-axis, so that the two directions on y-axis still show positive values, but different variables. I don't know how to present this on the y-axis label. Could anyone give me some hints on the figure? Thanks for your help.
I also attached a figure about bar charts, but in my case the second and third bars are in the opposite direction with the first bar in each group. I don't know how to do this, though it is possible to change the values in B and C, B2 and C2, etc, but the labels on y-axis may also change. Thanks.
A B C A2 B2 C2
1 65 21 54 64 23 55
2 66 23 55 66 22 54
3 54 24 56 70 25 60
4 44 23 53 68 19 49
5 67 22 52 60 18 48
6 66 21 50 54 20 46
7 45 20 51 55 21 51
8 56 19 57 58 22 54
9 40 25 58 59 18 52
10 39 24 53 61 21 48