1
I need to create a simple bar graph with data from a data frame. But I want to divide each bar of the graph into three.
For example: In the bar referring to the year 2000, I have to put three different values. This should be repeated by the year 2015. Soon six bars, and each one must be divided into three to put different values.
Was using
ggplot(data = ) +
geom_bar(mapping = aes(x , fill ), position = "dodge")
this code, but I cannot mount the data frame that is read by the function.
I want a graphic according to the image.
ggplot(data = diamonds, mapping = aes(x = cut, fill = color)) + geom_bar(position = "dodge")
.– Rui Barradas