I have a dataset called fruits_by_number like this:
category Number
Apple 4
Banana 5
Orange 2
Pear 0
I want to make a graph that on the x axis has bars symbolizing the fruit category and on the y axis the count as a height.
I have tried this:
qplot(x = category , y = number, data = fruits_by_number, geom = "dot")
My first question is: How instead of "dot" I ask for a bar?
My second questions is: Even if I get a bar, since in the (actual) dataset the fruit names are about 30, underneath the x-axis legend I get a big mess.
I saw this:
qplot(data = movies_df,Runtime,fill = Genre,bins = 30)
On this website there is this image:

which is something close to what I want to get.
I tried to substitute fill with dodge, but it did not work.
Could you help me on how to make a graph that the fruit categories will be arranged by color on the right (like in the image) and then I will have colorfur non-overlappping bars with height equal to the number?
PS1: If I follow this recommendation:
p <- ggplot(data = trans_units_by_subject, aes(x = category, y = sumUnits_t, fill = category))
p + geom_bar(stat = "identity")
I still get underneath the x-axis the descriptions like this: enter image description here
