Skip to content
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
21 lines (17 sloc) 2.3 KB
---
title: "Colors"
author: "Jason Bryer"
date: 2019-02-20
categories: ["R"]
tags: ["colors", "plots"]
---
<p>Upon grading the labs I noticed there is interest in adding color to the plots. I understand and appreciate the desire to make your figures more aesthetically pleasing. I have used colors to make the figures fit the overall style of whatever publication they are going to be used in. However, my general advice is to only use color when it adds value. For example, coloring bars or points based upon a quantitative variable is often very helpful. I generally ask myself this when adding color: &quot;Does the addition of color enhance the interpretation of my data or is it distracting?</p>
<p>If you are to use color, choosing a color palette that uses color blind safe colors is important. Here is a article I found that provides a good introduction and principles: <a href="https://venngage.com/blog/color-blind-friendly-palette/" class="uri">https://venngage.com/blog/color-blind-friendly-palette/</a></p>
<p>Additionally, there are palettes designed for different purposes (qualitative for quantitative variables). I have found [this] website a really useful resource for picking pallets.
I also use <a href="http://colorbrewer2.org">Color Brewer</a> very useful for picking colors. Many of the pallets are built into <code>ggplot2</code> with the <code>XXX_color_brewer</code> function.</p>
<p>Some important references for data visualization more broadly (i.e. not limited to use of colors):</p>
<ul>
<li>Edward Tufte’s <a href="https://www.edwardtufte.com/tufte/books_vdqi"><em>Visual Display of Quantitative Information</em></a></li>
<li>William Cleveland’s <a href="https://www.amazon.com/Visualizing-Data-William-S-Cleveland/dp/0963488406"><em>Visualizing Data</em></a> and <a href="https://www.amazon.com/gp/product/0963488414/ref=dbs_a_def_rwt_bibl_vppi_i0"><em>The Elements of Graphing Data</em></a></li>
<li>Leland Wilkinson’s <a href="https://www.amazon.com/Grammar-Graphics-Statistics-Computing/dp/0387245448/ref=sr_1_1?s=books&amp;ie=UTF8&amp;qid=1550692580&amp;sr=1-1&amp;keywords=grammar+of+graphics"><em>The Grammar of Graphics</em></a> and Hadley Wickham’s <a href="https://www.amazon.com/gp/product/0963488414/ref=dbs_a_def_rwt_bibl_vppi_i0"><em>ggplot2: Elegant Graphics for Data Analysis</em></a></li>
</ul>
You can’t perform that action at this time.