powered by
Shows how your plot appears to people with different types of color vision deficiency
gg_simulate_cvd(plot, type = "deutan")
A modified ggplot2 object showing the simulated view
A ggplot2 object
Type of CVD: "deutan" (green-blind), "protan" (red-blind), or "tritan" (blue-blind)
library(ggplot2) p <- ggplot(mtcars, aes(wt, mpg, color = factor(cyl))) + geom_point() + scale_color_manual(values = c("red", "green", "blue")) gg_simulate_cvd(p, type = "deutan")
Run the code above in your browser using DataLab