So I was trying to make this boxplot in the 'R for data science' book:
ggplot(data = smaller, mapping = aes(x = carat, y = price)) + geom_boxplot(mapping = aes(group = cut_width(carat, 0.1)))
according to the book it should look like this:
but when I run the code a different result comes about.(picture in the next comment)
anyway to go around it?