Use stat_count() for discrete variable by yutannihilation · Pull Request #94 · hadley/ggplot2-book
This pull request fixes #93. This code no longer works since StatBin requires a continuous x variable, while color is discrete. stat="count" should be specified. ggplot(diamonds, aes(colo...