Closed
Description
Hello, if I try to create a histogram with a vector of 0.25's the stat_bin computation fails (plots an empty plot) with the warning:
Warning message:
Computation failed in stat_bin()
:
invalid number of intervals.
I am guessing it is something to do with how it calculates the bins if all the data are equal? All other values I have tried are fine.
Cheers
library(ggplot2)
ggplot() + geom_histogram(aes(x= rep(0.25,10))) # Fails
ggplot() + geom_histogram(aes(x= rep(0.15,10))) # Normal
ggplot() + geom_histogram(aes(x= rep(0.35,10))) # Normal
Metadata
Metadata
Assignees
Labels
No labels