Reputation: 399
I am creating a graph using ggplot2. Here is the first output of the graph before any tidying is done.
And here is the code:
graph <- ggplot(data = village.times,
aes(x=village.times$a6ncopo, y=(village.times$a5species=="funestus")))
+ geom_bar(stat="identity", position = "stack", fill="#FF4444")
What I don't know is why there isn't a scale on the y axis and how to remove the True-False labels. Is there a way I can force ggplot to include a scale on the y axis or do I have to change the way I use my data?
Upvotes: 1
Views: 324
Reputation: 11762
Maybe subsetting your data frame before using ggplot and just creating a histogram? Otherwise I don't what your expected result should be...
ggplot(subset(village.times, a5species=="funestus"),
aes(x=a6ncopo)) +
geom_bar()
Upvotes: 1