I imagine this is pretty close. If I then used a ggimage for the shapes, I'd bet it could look really good. But hiding the mutates and geom_point would be awesome if someone knows how.
suppressPackageStartupMessages(library(tidyverse))
tibble(a=runif(4),b=letters[1:4], p=list(seq(.01,1,.01))) %>%
unnest() %>%
mutate(q = ifelse(a>p,1,0),
label = paste(b,scales::percent(a)),
x = ((p-0.01)*100)%%10,
y = ((p-0.01)*100)%/%10) %>%
ggplot() +
geom_point(mapping=aes(x=x, y=y, color = q, fill=q, shape = factor(q))) +
scale_y_continuous(name="") +
scale_x_continuous(name="") +
scale_shape_manual(values = c(25,24)) +
guides(fill=FALSE, shape=FALSE, color=FALSE) +
facet_wrap(~label, nrow = 2) +
theme_void()
I'd like to do something like:
tibble(a=runif(4),b=letters[1:4]) %>%
ggplot() +
geom_pictorial(aes(value = a), grid_dimension = c(10,10), shapes = c(image1, image2))