Check Devtools
if (!requireNamespace("devtools", quietly = TRUE)) install.packages("devtools")
Install JGPlot2
devtools::install_github("jeffmgranja/jgplot2")
Discrete Palette (stallion3)
displayAllColors(jgplot2:::.stallion3[[20]])
Continuous Palette (solarExtra)
displayAllColors(colorRampPalette(jg_palettes()[["solarExtra"]])(10))
stallion3 normal vision
lapply(seq_len(20), function(x){
displayColors(jgplot2:::.stallion3[[x]]) +
theme(plot.margin = unit(c(0, 0, 0, 0), "cm")) +
coord_cartesian(xlim = c(1, 20))
}) %>% Reduce("+", .) %>% {. + plot_layout(ncol=1) + plot_annotation(title = 'Stallion Version 3 (stallion3)')}
stallion3 deuteranope
lapply(seq_len(20), function(x){
displayColors(cvdSimulator(jgplot2:::.stallion3[[x]], "deuteranope")) +
theme(plot.margin = unit(c(0, 0, 0, 0), "cm")) +
coord_cartesian(xlim = c(1, 20))
}) %>% Reduce("+", .) %>% {. + plot_layout(ncol=1) + plot_annotation(title = 'Stallion Version 3 (stallion3) : Deuteranope')}
stallion3 protanope
lapply(seq_len(20), function(x){
displayColors(cvdSimulator(jgplot2:::.stallion3[[x]], "protanope")) +
theme(plot.margin = unit(c(0, 0, 0, 0), "cm")) +
coord_cartesian(xlim = c(1, 20))
}) %>% Reduce("+", .) %>% {. + plot_layout(ncol=1) + plot_annotation(title = 'Stallion Version 3 (stallion3) : Protanope')}