Closed raynamharris closed 7 years ago
Rayna, can you try again, this time in English? Also, have you looked at the vignette text Claire has written? It's not finished, but there's a lot of material already.
Ah. Okay, I had only looked at the README, but I found a good enough solution in the vignette using:
library(magick) p <- ggdraw() + draw_image("myimage.png") # turn png into ggplot object`. p2 <- edit_colors(p, tritan, sev = .7) p3 <- edit_colors(p, deutan, sev = .7) p4 <- edit_colors(p, protan, sev = .7) plot_grid(p, p2, p3, p4, nrow=2)
However, I know you and @clairemcwhite have ways to add images to ggplots in R rather than in Adobe (like I did to place the image in the left corner of the plot above) or some other software, but I can't seem to find any tutorials or example code where y'all have done this.
Look up the documentation for draw_image
, part of cowplot. Easiest is to do ?draw_image
on the R command line.
Let's say you have an image of three species of flower with an outline of each filled using the OkabeIto color scale. This way, when you view the colorblinr images you also see how colorblindness affects the accompanying visuals that use the same color scheme? Do you have a vignette for how to adding images to these plots before you export them to colorblindr?