geom_2d() with Binned Counts

6 views
Skip to first unread message

Dario Strbenac

unread,
Mar 24, 2015, 8:00:21 PM3/24/15
to ggp...@googlegroups.com
The example creates a continuous legend. How can it be binned, for example, into 0-5 and 6-10 counts ?

set.seed(44)
exampleData <- data.frame(method = sample(c("A", "B"), 10, replace = TRUE),
                          prediction = sample(c("Healthy", "Disease"), 10, replace = TRUE))

ggplot(exampleData, aes(x = method, y = prediction)) + geom_bin2d()   
Reply all
Reply to author
Forward
0 new messages