I am trying to make a tiled plot with ggplot2 with a single variable. The data looks like this:
fruit numbers
apples 6
peaches 2
grapes 10
cherries 2
... many more fruit
I can plot the same data as the x and as the y variables, I can use this code:
p <- qplot(fruit,fruit) + geom_tile(aes(fill=numbers))
The output looks like this:

The above plot is precisely what I would like to plot; however, I need the data arranged in a single horizontal 1-dimensional plot. How can I create a 1D horizontal titled plot with 1 variable?
1 Answer