Plot the color-deficiency simulations for ggplot grob.
cvdPlot(
plot = last_plot(),
layout = c("origin", "deuteranope", "protanope", "desaturate")
)
The grob to be plotted.
The sub-figure types. the choices are origin, deuteranope, protanope, desaturate, and enhanced, enhanced.deuteranope, enhanced.protanope, enhanced.desaturate.
An object of ggplot.
This function is modified from <https://github.com/clauswilke/colorblindr>
# NOT RUN {
cvdPlot(displayColors(safeColors))
cvdPlot(displayColors(paletteMartin))
# }
Run the code above in your browser using DataLab