0, 0, 0, 0, 0, 0, 0 ) ,3,3,byrow=TRUE))} to_green <- function(c){simulate_cvd(c, matrix(c( 0, 0, 0, 0, 1, 0, 0, 0, 0 ) ,3,3,byrow=TRUE))} to_blue <- function(c){simulate_cvd(c, matrix(c( 0, 0, 0, 0, 0, 0, 0, 0, 1 ) ,3,3,byrow=TRUE))} p2 <- edit_colors(p, to_red ) p3 <- edit_colors(p, to_green ) p4 <- edit_colors(p, to_blue ) plot_grid(p,p2,p3,p4)