inst/examples/ex-other-discrete.R

library(ggplot2)

logic <- data.frame(
  x = rep(1:5, times = 5),
  y = rep(1:5, each = 5),
  values = sample(c(TRUE, FALSE), 25, TRUE)
)

ggplot2::ggplot(logic, ggplot2::aes(x, y, fill = values)) +
  ggplot2::geom_raster() +
  scale_fill_logical()

Try the khroma package in your browser

Any scripts or data that you put into this service are public.

khroma documentation built on Sept. 11, 2024, 5:26 p.m.