I'm trying to create a histogram with ggplot. Therefore I used the following code:
data_csv <- read.csv("XXX.csv", na="NA")
data_csv$Success <- factor(data_csv$Success)
ggplot(data_csv, aes(x=Phasenew, color=Success)) +
geom_histogram(binwidth = 1, color="white", fill="steelblue", position = "dodge")
Unfortunatly, the plot lookes like this:
What I'm expecting is to have 2 dodged bars next to each other, because I'm using color=Success
in the ggplot.
Do you have any idea what I'm doing wrong?