I have a matrix like this:
My_ABC
A B C
a1 12 22 51
a2 33 11 39
b1 44 88 69
b2 12 10 49
c1 22 23 48
c2 11 44 58
I am making a grouped barplot using :
barplot(My_ABC, col = plotting_colors, border = "white", beside = "True")
Now after doing some more analysis, I have percentages for four categories for each value b1, b2, a1, a2 etc. Now I want to add that information into my grouped barplot by showing the percentages in the form of stacked barplot for each bar in my plot. Can anyone help me do that? I found some examples that used the datafrrame to do this and I tried but I may not be adding the new information correctly or something, I am not getting the figure i want which is essentially a grouped barplot of stacked bars in R.