user1867185
user1867185

Reputation: 407

changing the range of counts in stat_binhex

I wanted to expand the range of counts in stat_binhex. The toy example listed on the site, http://docs.ggplot2.org/0.9.3.1/stat_binhex.html, has a range for counts in the legend field, and I wanted to expand it. In other words, I wanted to make the counts range finer.

Upvotes: 2

Views: 729

Answers (1)

Didzis Elferts
Didzis Elferts

Reputation: 98429

As for bins fill is used to change colors you can use scale_fill_continuous() to set breaks= at positions you need.

ggplot(diamonds, aes(carat, price)) + stat_binhex() + 
         scale_fill_continuous(breaks=seq(0,6000,500))

enter image description here

Upvotes: 3

Related Questions