I want to plot a grouped bar chart. The dataset which I'm using for a plot is very large. Here is a small subset of it:
Label size
x 2 3 4 5
y 2 6 8
z 1 6 8
a 2 2
b 4 7 9 10 11
c 8 12
I want to plot a bar-chart in which, on x axis there would be labels, and on y axis there would be multiple bars of sizes given.
For example here, x
has sizes 2 3 4 5
. So there would be four bars with heights 2, 3 , 4 and 5. Then y
has sizes 2 6 8
. So there would be 3 bars with sizes 2, 6 and 8 and so on.
Can any one help me out?
dput(droplevels(head(mydata)))
. – Gregor Thomas