可以通過
geom_hex(aes(fill = after_stat(count)), bins = 60)
ggplot(data, aes(x = theta, y = precision)) +
geom_hex(aes(fill = after_stat(count)), bins = 60) +
scale_fill_gradient(low = "blue", high = "red")
概率密度
ggplot(data, aes(x = theta, y = precision)) +
geom_hex(aes(fill = after_stat(count)), bins = 60) +
scale_fill_gradient(low = "#00467F", high = "#A5cc82")
概率密度