Skip to content

Commit

Permalink
20241219 - color schemes for color-blind viewers
Browse files Browse the repository at this point in the history
  • Loading branch information
isaactpetersen committed Dec 19, 2024
1 parent fc3321a commit 0facb85
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
6 changes: 6 additions & 0 deletions data-visualization.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,14 @@ A key principle of graphic design and data visualization is the importance of co
Each visual component (e.g., line) that is important to see should be easy to distinguish.
For instance, you can highlight lines or points of interest to draw people's attention to the target of interest [@Schwabish2021].
For examples of highlighting in figures, see Figures [-@fig-lineChartHighlighting] (@sec-lineChartHighlighting) and [-@fig-simulationOf10CoinFlips].

It is also important to use color schemes with distinguishable colors.
Good color schemes for sequential, diverging, and qualitative (i.e., categorical) data are provided by ColorBrewer (<https://colorbrewer2.org>) and are available using the `scale_color_brewer()` and `scale_fill_brewer()` functions of the `ggplot2` package, as demonstrated in @fig-barPlotColorScheme (@sec-barPlotModifiedColorScheme).
There are a variety of resources for color schemes that are accessible to color-blind viewers:

- <https://www.datylon.com/blog/data-visualization-for-colorblind-readers> (archived at <https://perma.cc/7VTA-Y8YS>)
- <https://cran.r-project.org/web/packages/viridis/vignettes/intro-to-viridis.html> (archived at <https://perma.cc/NK9K-HL7L>)
- @Nunez2018

## Univariate Distribution {#sec-univariateDistribution}

Expand Down
14 changes: 14 additions & 0 deletions references.bib
Original file line number Diff line number Diff line change
Expand Up @@ -111874,6 +111874,20 @@ @Article{Eastwell2014
volume = {13},
}


@Article{Nunez2018,
author = {Nuñez, Jamie R. and Anderton, Christopher R. and Renslow, Ryan S.},
journal = {PLOS ONE},
title = {Optimizing colormaps with consideration for color vision deficiency to enable accurate interpretation of scientific data},
year = {2018},
number = {7},
pages = {e0199239},
volume = {13},
abstract = {Color vision deficiency (CVD) affects more than 4% of the population and leads to a different visual perception of colors. Though this has been known for decades, colormaps with many colors across the visual spectra are often used to represent data, leading to the potential for misinterpretation or difficulty with interpretation by someone with this deficiency. Until the creation of the module presented here, there were no colormaps mathematically optimized for CVD using modern color appearance models. While there have been some attempts to make aesthetically pleasing or subjectively tolerable colormaps for those with CVD, our goal was to make optimized colormaps for the most accurate perception of scientific data by as many viewers as possible. We developed a Python module, cmaputil, to create CVD-optimized colormaps, which imports colormaps and modifies them to be perceptually uniform in CVD-safe colorspace while linearizing and maximizing the brightness range. The module is made available to the science community to enable others to easily create their own CVD-optimized colormaps. Here, we present an example CVD-optimized colormap created with this module that is optimized for viewing by those without a CVD as well as those with red-green colorblindness. This colormap, cividis, enables nearly-identical visual-data interpretation to both groups, is perceptually uniform in hue and brightness, and increases in brightness linearly.},
doi = {10.1371/journal.pone.0199239},
url = {https://doi.org/10.1371/journal.pone.0199239},
}

@Comment{jabref-meta: databaseType:bibtex;}

@Comment{jabref-meta: saveActions:enabled;
Expand Down

0 comments on commit 0facb85

Please sign in to comment.