I would like to plot data with repeated x-axis labels in the form of bar-plot without merging the values with repeated labels.
In the example I have a table de
:
de <- data.frame(mean=c(10, 2, 3, 1, 4, 5, 3, 9),
base=c('A','A','C','G','T','T','T','A'))
And I would like to have a plot like this:
But when I run this in R:
ggplot(de, aes( y = mean, x =base))+
geom_bar(stat = 'identity')
This is what I get:
It merges the identical bases into one column, whereas I want a separate column for each value of base
, even the repeated ones, as shown in the table above.