View source: R/ColorAdjustments.R
Simulate | R Documentation |
Essentially a wrapper function for colorspace's deutan(), protan(), and tritan() functions. This function will output any dittoSeq plot as it might look to an individual with one of the common forms of colorblindness: deutanopia/deutanomaly, the most common, is when the cones mainly responsible for red vision are defective. Protanopia/protanomaly is when the cones mainly responsible for green vision are defective. In tritanopia/tritanomaly, the defective cones are responsible for blue vision. Note: there are more severe color deficiencies that are even more rare. Unfortunately, for these types of color vision deficiency, only non-color methods, like lettering or shapes, will do much to help.
Simulate(
type = c("deutan", "protan", "tritan"),
plot.function,
...,
color.panel = dittoColors(),
min.color = "#F0E442",
max.color = "#0072B2"
)
type |
The type of colorblindness that you want to simulate for. Options: "deutan", "protan", "tritan". Anything else, and you will get an error. |
plot.function |
The plotting function that you want to use/simulate. not quoted. and make sure to remove the () that R will try to add. |
... |
other paramters that can be given to dittoSeq plotting functions, including color.panel, used in exactly the same way they are used for those functions. (contrary to the look of this documentation, color.panel will still default to dittoColors() when not provided.) |
color.panel , min.color , max.color |
The set of colors to be used. |
Outputs a dittoSeq plot with the color.panel / min.color & max.color updated as it might look to a colorblind individual.
Note: Does not currently adjust dittoHeatmap.
Daniel Bunis
example(importDittoBulk, echo = FALSE)
Simulate("deutan", dittoDimPlot, object=myRNA, var="clustering", size = 2)
Simulate("protan", dittoDimPlot, myRNA, "clustering", size = 2)
Simulate("tritan", dittoDimPlot, myRNA, "clustering", size = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.