Reputation: 10955
How can I specify breaks for each axis in a geom_bin_2d
like a geom_histogram
?
For example, geom_histogram
lets me control the breaks exactly:
ggplot(iris, aes(x = Sepal.Width)) +
geom_histogram(breaks = seq(1, 5, 0.5))
I want to do something analogous, but be able to control the rectangle boundaries exactly instead of just binwidth or number of bins:
ggplot(iris, aes(x = Sepal.Width, y = Sepal.Length)) +
geom_bin_2d(bins = 10)
Upvotes: 0
Views: 25