I would like to create geom_points whose area is filled in according to a proportion. Something like Harvey balls, although Harvey balls usually only map 0% 25% 50% 75% and 100% whereas in this case the fill could be anything from 0 to 100% e.g.
The geom_point doesn't need to be a circle, it could be a bar whose area fills up in proportion to the frac as well. So long as the area fill is proportional to fraction it'll work fine. e.g.
Reproducible data
library(tidyverse)
df <-
tibble(
x = c(1:5),
y = c(5:1),
yes = c(1, 14, 10, 42, 53),
total = c(11, 21, 25, 50, 100),
frac = yes/total)
df %>%
ggplot(
aes(
x = x,
y = y)) +
geom_point(
fill = "#000000",
size = 7.5)




