Description Usage Arguments Details Value Examples
View source: R/theme_deutera.R
: theme_deutera() creates a theme with a Deuteranopia friendly colour palette that can be used on both colour and fill aesthetics. Use it in conjuction with ggplot2
1 | : ggplot(data, aes(variable x, variable y, colour = class)) + geom_point() + theme_deutera('colour')
|
colour_type |
either fill colour of colour depending on the geom of choice |
This function implements a theme that makes plots more intepretable for viewers with deuteranopia. It modifies the colour of geometric objects (points, lines, etc) and the layout of the plot.
: Create your plot via ggplot2 and apply our theme to enhance plots to be more readable for colourblind viewers
reformatted plot for deuteranopia vision
1 2 3 4 5 | ## Not run: ggplot(mpg, aes(x = hwy, y = cty, fill = as.factor(cyl))) +geom_bar(stat = 'identity') + theme_deutera(colour_type = 'fill')
## Not run: ggplot(mpg, aes(x = hwy, y = cty, colour = as.factor(cyl))) + geom_point(stat = 'identity') + theme_deutera(colour_type = 'colour')
## Not run: ggplot(mpg, aes(hwy, colour = as.factor(cyl))) + geom_density() + theme_deutera(colour_type = 'colour')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.