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()