592 lines
2.4 MiB
HTML
Raw Normal View History

2025-01-12 00:52:51 +08:00
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="author" content="Bob Rudis, Noam Ross and Simon Garnier" />
<meta name="date" content="2024-01-28" />
<title>Introduction to the viridis color maps</title>
<script>// Pandoc 2.9 adds attributes on both header and div. We remove the former (to
// be compatible with the behavior of Pandoc < 2.8).
document.addEventListener('DOMContentLoaded', function(e) {
var hs = document.querySelectorAll("div.section[class*='level'] > :first-child");
var i, h, a;
for (i = 0; i < hs.length; i++) {
h = hs[i];
if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6
a = h.attributes;
while (a.length > 0) h.removeAttribute(a[0].name);
}
});
</script>
<style type="text/css">
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
ul.task-list{list-style: none;}
</style>
<style type="text/css">
code {
white-space: pre;
}
.sourceCode {
overflow: visible;
}
</style>
<style type="text/css" data-origin="pandoc">
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
div.sourceCode { margin: 1em 0; }
pre.sourceCode { margin: 0; }
@media screen {
div.sourceCode { overflow: auto; }
}
@media print {
pre > code.sourceCode { white-space: pre-wrap; }
pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
}
pre.numberSource code
{ counter-reset: source-line 0; }
pre.numberSource code > span
{ position: relative; left: -4em; counter-increment: source-line; }
pre.numberSource code > span > a:first-child::before
{ content: counter(source-line);
position: relative; left: -1em; text-align: right; vertical-align: baseline;
border: none; display: inline-block;
-webkit-touch-callout: none; -webkit-user-select: none;
-khtml-user-select: none; -moz-user-select: none;
-ms-user-select: none; user-select: none;
padding: 0 4px; width: 4em;
color: #aaaaaa;
}
pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; }
div.sourceCode
{ }
@media screen {
pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
}
code span.al { color: #ff0000; font-weight: bold; }
code span.an { color: #60a0b0; font-weight: bold; font-style: italic; }
code span.at { color: #7d9029; }
code span.bn { color: #40a070; }
code span.bu { color: #008000; }
code span.cf { color: #007020; font-weight: bold; }
code span.ch { color: #4070a0; }
code span.cn { color: #880000; }
code span.co { color: #60a0b0; font-style: italic; }
code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; }
code span.do { color: #ba2121; font-style: italic; }
code span.dt { color: #902000; }
code span.dv { color: #40a070; }
code span.er { color: #ff0000; font-weight: bold; }
code span.ex { }
code span.fl { color: #40a070; }
code span.fu { color: #06287e; }
code span.im { color: #008000; font-weight: bold; }
code span.in { color: #60a0b0; font-weight: bold; font-style: italic; }
code span.kw { color: #007020; font-weight: bold; }
code span.op { color: #666666; }
code span.ot { color: #007020; }
code span.pp { color: #bc7a00; }
code span.sc { color: #4070a0; }
code span.ss { color: #bb6688; }
code span.st { color: #4070a0; }
code span.va { color: #19177c; }
code span.vs { color: #4070a0; }
code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; }
</style>
<script>
// apply pandoc div.sourceCode style to pre.sourceCode instead
(function() {
var sheets = document.styleSheets;
for (var i = 0; i < sheets.length; i++) {
if (sheets[i].ownerNode.dataset["origin"] !== "pandoc") continue;
try { var rules = sheets[i].cssRules; } catch (e) { continue; }
var j = 0;
while (j < rules.length) {
var rule = rules[j];
// check if there is a div.sourceCode rule
if (rule.type !== rule.STYLE_RULE || rule.selectorText !== "div.sourceCode") {
j++;
continue;
}
var style = rule.style.cssText;
// check if color or background-color is set
if (rule.style.color === '' && rule.style.backgroundColor === '') {
j++;
continue;
}
// replace div.sourceCode by a pre.sourceCode rule
sheets[i].deleteRule(j);
sheets[i].insertRule('pre.sourceCode{' + style + '}', j);
}
}
})();
</script>
<style type="text/css">body {
background-color: #fff;
margin: 1em auto;
max-width: 700px;
overflow: visible;
padding-left: 2em;
padding-right: 2em;
font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px;
line-height: 1.35;
}
#TOC {
clear: both;
margin: 0 0 10px 10px;
padding: 4px;
width: 400px;
border: 1px solid #CCCCCC;
border-radius: 5px;
background-color: #f6f6f6;
font-size: 13px;
line-height: 1.3;
}
#TOC .toctitle {
font-weight: bold;
font-size: 15px;
margin-left: 5px;
}
#TOC ul {
padding-left: 40px;
margin-left: -1.5em;
margin-top: 5px;
margin-bottom: 5px;
}
#TOC ul ul {
margin-left: -2em;
}
#TOC li {
line-height: 16px;
}
table {
margin: 1em auto;
border-width: 1px;
border-color: #DDDDDD;
border-style: outset;
border-collapse: collapse;
}
table th {
border-width: 2px;
padding: 5px;
border-style: inset;
}
table td {
border-width: 1px;
border-style: inset;
line-height: 18px;
padding: 5px 5px;
}
table, table th, table td {
border-left-style: none;
border-right-style: none;
}
table thead, table tr.even {
background-color: #f7f7f7;
}
p {
margin: 0.5em 0;
}
blockquote {
background-color: #f6f6f6;
padding: 0.25em 0.75em;
}
hr {
border-style: solid;
border: none;
border-top: 1px solid #777;
margin: 28px 0;
}
dl {
margin-left: 0;
}
dl dd {
margin-bottom: 13px;
margin-left: 13px;
}
dl dt {
font-weight: bold;
}
ul {
margin-top: 0;
}
ul li {
list-style: circle outside;
}
ul ul {
margin-bottom: 0;
}
pre, code {
background-color: #f7f7f7;
border-radius: 3px;
color: #333;
white-space: pre-wrap;
}
pre {
border-radius: 3px;
margin: 5px 0px 10px 0px;
padding: 10px;
}
pre:not([class]) {
background-color: #f7f7f7;
}
code {
font-family: Consolas, Monaco, 'Courier New', monospace;
font-size: 85%;
}
p > code, li > code {
padding: 2px 0px;
}
div.figure {
text-align: center;
}
img {
background-color: #FFFFFF;
padding: 2px;
border: 1px solid #DDDDDD;
border-radius: 3px;
border: 1px solid #CCCCCC;
margin: 0 5px;
}
h1 {
margin-top: 0;
font-size: 35px;
line-height: 40px;
}
h2 {
border-bottom: 4px solid #f7f7f7;
padding-top: 10px;
padding-bottom: 2px;
font-size: 145%;
}
h3 {
border-bottom: 2px solid #f7f7f7;
padding-top: 10px;
font-size: 120%;
}
h4 {
border-bottom: 1px solid #f7f7f7;
margin-left: 8px;
font-size: 105%;
}
h5, h6 {
border-bottom: 1px solid #ccc;
font-size: 105%;
}
a {
color: #0033dd;
text-decoration: none;
}
a:hover {
color: #6666ff; }
a:visited {
color: #800080; }
a:visited:hover {
color: #BB00BB; }
a[href^="http:"] {
text-decoration: underline; }
a[href^="https:"] {
text-decoration: underline; }
code > span.kw { color: #555; font-weight: bold; }
code > span.dt { color: #902000; }
code > span.dv { color: #40a070; }
code > span.bn { color: #d14; }
code > span.fl { color: #d14; }
code > span.ch { color: #d14; }
code > span.st { color: #d14; }
code > span.co { color: #888888; font-style: italic; }
code > span.ot { color: #007020; }
code > span.al { color: #ff0000; font-weight: bold; }
code > span.fu { color: #900; font-weight: bold; }
code > span.er { color: #a61717; background-color: #e3d2d2; }
</style>
</head>
<body>
<h1 class="title toc-ignore">Introduction to the viridis color maps</h1>
<h4 class="author">Bob Rudis, Noam Ross and Simon Garnier</h4>
<h4 class="date">2024-01-28</h4>
<div id="TOC">
<ul>
<li><a href="#tldr" id="toc-tldr">tl;dr</a></li>
<li><a href="#introduction" id="toc-introduction">Introduction</a></li>
<li><a href="#the-color-scales" id="toc-the-color-scales">The Color
Scales</a></li>
<li><a href="#comparison" id="toc-comparison">Comparison</a></li>
<li><a href="#usage" id="toc-usage">Usage</a></li>
<li><a href="#gallery" id="toc-gallery">Gallery</a></li>
</ul>
</div>
<style>
img {
max-width: 100%;
max-height: 100%;
}
</style>
<div id="tldr" class="section level1">
<h1>tl;dr</h1>
<p>Use the color scales in this package to make plots that are pretty,
better represent your data, easier to read by those with colorblindness,
and print well in gray scale.</p>
<p>Install <strong>viridis</strong> like any R package:</p>
<pre><code>install.packages(&quot;viridis&quot;)
library(viridis)</code></pre>
<p>For base plots, use the <code>viridis()</code> function to generate a
palette:</p>
<div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb2-1"><a href="#cb2-1" tabindex="-1"></a>x <span class="ot">&lt;-</span> y <span class="ot">&lt;-</span> <span class="fu">seq</span>(<span class="sc">-</span><span class="dv">8</span><span class="sc">*</span>pi, <span class="dv">8</span><span class="sc">*</span>pi, <span class="at">len =</span> <span class="dv">40</span>)</span>
<span id="cb2-2"><a href="#cb2-2" tabindex="-1"></a>r <span class="ot">&lt;-</span> <span class="fu">sqrt</span>(<span class="fu">outer</span>(x<span class="sc">^</span><span class="dv">2</span>, y<span class="sc">^</span><span class="dv">2</span>, <span class="st">&quot;+&quot;</span>))</span>
<span id="cb2-3"><a href="#cb2-3" tabindex="-1"></a><span class="fu">filled.contour</span>(<span class="fu">cos</span>(r<span class="sc">^</span><span class="dv">2</span>)<span class="sc">*</span><span class="fu">exp</span>(<span class="sc">-</span>r<span class="sc">/</span>(<span class="dv">2</span><span class="sc">*</span>pi)), </span>
<span id="cb2-4"><a href="#cb2-4" tabindex="-1"></a> <span class="at">axes=</span><span class="cn">FALSE</span>,</span>
<span id="cb2-5"><a href="#cb2-5" tabindex="-1"></a> <span class="at">color.palette=</span>viridis,</span>
<span id="cb2-6"><a href="#cb2-6" tabindex="-1"></a> <span class="at">asp=</span><span class="dv">1</span>)</span></code></pre></div>
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABUAAAAPACAYAAAD0ZtPZAAAEDmlDQ1BrQ0dDb2xvclNwYWNlR2VuZXJpY1JHQgAAOI2NVV1oHFUUPpu5syskzoPUpqaSDv41lLRsUtGE2uj+ZbNt3CyTbLRBkMns3Z1pJjPj/KRpKT4UQRDBqOCT4P9bwSchaqvtiy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ggggAACCCCAAAIIIIAAAgRAaQMIIIAAAggggAACCCCAAAIIIIAAAgggkFgBAqCJrVoKhgACCCCAAAIIIIAAAggggAACCCCAAAIEQGkDCCCAAAIIIIAAAggggAACCCCAAAIIIJBYAQKgia1aCoYAAggggAACCCCAAAIIIIAAAggggAACBEBpAwgggAACCCCAAAIIIIAAAggggAACCCCQWAECoImtWgqGAAIIIIAAAggggAACCCCAAAIIIIAAAgRAaQMIIIAAAggggAACCCCAAAIIIIAAAgggkFgBAqCJrVoKhgACCCCAAAIIIIAAAggggAACCCCAAAIEQGkDCCCAAAIIIIAAAggggAACCCCAAAIIIJBYAQKgia1aCoYAAggggAACCCCAAAIIIIAAAggggAACBEBpAwgggAACCCCAAAIIIIAAAggggAACCCCQWAECoImtWgqGAAIIIIAAAggggAACCCCAAAIIIIAAAgRAaQMIIIAAAggggAACCCCAAAIIIIAAAgggkFgBAqCJrVoKhgACCCCAAAIIIIAAAggggAACCCCAAAIEQGkDCCCAAAIIIIAAAggggAACCCCAAAIIIJBYAQKgia1aCoYAAggggAACCCCAAAIIIIAAAggggAACBEBpAwgggAACCCCAAAIIIIAAAggggAACCCCQWAECoImtWgqGAAIIIIAAAggggAACCCCAAAIIIIAAAgRAaQMIIIAAAggggAACCCCAAAIIIIAAAgggkFgBAqCJrVoKhgACCCCAAAIIIIAAAggggAACCCCAAAIEQGkDCCCAAAIIIIAAAggggAACCCCAAAIIIJBYAQKgia1aCoYAAggggAACCCCAAAIIIIAAAggggAACBEBpAwgggAACCCCAAAIIIIAAAggggAACCCCQWAECoImtWgqGAAIIIIAAAggggAACCCCAAAIIIIAAAgRAaQMIIIAAAggggAACCCCAAAIIIIAAAgggkFgBAqCJrVoKhgACCCCAAAIIIIAAAggggAACCCCAAAIEQGkDCCCAAAIIIIAAAggggAACCCCAAAIIIJBYAQKgia1aCoYAAggggAACCCCAAAIIIIAAAggggAACBEBpAwgggAACCCCAAAIIIIAAAggggAACCCCQWAECoImtWgqGAAIIIIAAAggggAACCCCAAAIIIIAAAgRAaQMIIIAAAggggAACCCCAAAIIIIAAAgggkFgBAqCJrVoKhgACCCCAAAIIIIAAAggggAACCCCAAAIEQGkDCCCAAAIIIIAAAggggAACCCCAAAIIIJBYAQKgia1aCoYAAggggAACCCCAAAIIIIAAAggggAACBEBpAwgggAACCCCAAAIIIIAAAggggAACCCCQWAECoImtWgqGAAIIIIAAAggggAACCCCAAAIIIIAAAgRAaQMIIIAAAggggAACCCCAAAIIIIAAAgggkFgBAqCJrVoKhgACCCCAAAIIIIAAAggggAACCCCAAAIEQGkDCCCAAAIIIIAAAggggAACCCCAAAIIIJBYAQKgia1aCoYAAggggAACCCCAAAIIIIAAAggggAACBEBpAwgggAACCCCAAAIIIIAAAggggAACCCCQWAECoImtWgqGAAIIIIAAAggggAACCCCAAAIIIIAAAgRAaQMIIIAAAggggAACCCCAAAIIIIAAAggg
<p>For ggplot, use <code>scale_color_viridis()</code> and
<code>scale_fill_viridis()</code>:</p>
<div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb3-1"><a href="#cb3-1" tabindex="-1"></a><span class="fu">library</span>(ggplot2)</span>
<span id="cb3-2"><a href="#cb3-2" tabindex="-1"></a><span class="fu">ggplot</span>(<span class="fu">data.frame</span>(<span class="at">x =</span> <span class="fu">rnorm</span>(<span class="dv">10000</span>), <span class="at">y =</span> <span class="fu">rnorm</span>(<span class="dv">10000</span>)), <span class="fu">aes</span>(<span class="at">x =</span> x, <span class="at">y =</span> y)) <span class="sc">+</span></span>
<span id="cb3-3"><a href="#cb3-3" tabindex="-1"></a> <span class="fu">geom_hex</span>() <span class="sc">+</span> <span class="fu">coord_fixed</span>() <span class="sc">+</span></span>
<span id="cb3-4"><a href="#cb3-4" tabindex="-1"></a> <span class="fu">scale_fill_viridis</span>() <span class="sc">+</span> <span class="fu">theme_bw</span>()</span></code></pre></div>
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABUAAAAPACAYAAAD0ZtPZA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NOmTbJmzRrLN9X6JkW2y+HDhy2rRowYYdlH/7zkkktsd+M5AggggAACCCCAAAIIIIAAAggggICXCxCAenkH0nz7AuWX6OjRT/YWPSpKL9aXkdjbl/UIIIAAAggggAACCCCAAAIIIIAAAt4nQADqfX1Gi50Q6Ny5s/zvf/+zu+ell14qehToe++9J23atLG7HxsQQAABBBBAAAEEEEAAAQQQQAABBLxbwNe7m0/rEUAAAQQQQAABBBBAAAEEEEAAAQQQQAAB+wIEoPZt2IIAAggggAACCCCAAAIIIIAAAggggAACXi5AAOrlHUjzEUAAAQQQQAABBBBAAAEEEEAAAQQQQMC+AHOA2rdhSz0W+Prrr+vx2XFqCCCAAAIIIIAAAggggAACCCCAAALlAowALZfgJwIIIIAAAggggAACCCCAAAIIIIAAAgjUOwEC0HrXpZwQAggggAACCCCAAAIIIIAAAggggAACCJQLEICWS/ATAQQQQAABBBBAAAEEEEAAAQQQQAABBOqdAAFovetSTggBBBBAAAEEEEAAAQQQQAABBBBAAAEEygUIQMsl+IkAAggggAACCCCAAAIIIIAAAggggAAC9U6AALTedSknhAACCCCAAAIIIIAAAggggAACCCCAAALlAgSg5RL8RAABBBBAAAEEEEAAAQQQQAABBBBAAIF6J0AAWu+6lBNCAAEEEEAAAQQQQAABBBBAAAEEEEAAgXIBAtByCX4igAACCCCA
<hr />
</div>
<div id="introduction" class="section level1">
<h1>Introduction</h1>
<p><a href="https://cran.r-project.org/package=viridis"><code>viridis</code></a>,
and its companion package <a href="https://cran.r-project.org/package=viridisLite"><code>viridisLite</code></a>
provide a series of color maps that are designed to improve graph
readability for readers with common forms of color blindness and/or
color vision deficiency. The color maps are also perceptually-uniform,
both in regular form and also when converted to black-and-white for
printing.</p>
<p>These color maps are designed to be:</p>
<ul>
<li><strong>Colorful</strong>, spanning as wide a palette as possible so
as to make differences easy to see,</li>
<li><strong>Perceptually uniform</strong>, meaning that values close to
each other have similar-appearing colors and values far away from each
other have more different-appearing colors, consistently across the
range of values,</li>
<li><strong>Robust to colorblindness</strong>, so that the above
properties hold true for people with common forms of colorblindness, as
well as in grey scale printing, and</li>
<li><strong>Pretty</strong>, oh so pretty</li>
</ul>
<p><code>viridisLite</code> provides the base functions for generating
the color maps in base <code>R</code>. The package is meant to be as
lightweight and dependency-free as possible for maximum compatibility
with all the <code>R</code> ecosystem. <a href="https://cran.r-project.org/package=viridis"><code>viridis</code></a>
provides additional functionalities, in particular bindings for
<code>ggplot2</code>.</p>
<hr />
</div>
<div id="the-color-scales" class="section level1">
<h1>The Color Scales</h1>
<p>The package contains eight color scales: “viridis”, the primary
choice, and five alternatives with similar properties - “magma”,
“plasma”, “inferno”, “civids”, “mako”, and “rocket” -, and a rainbow
color map - “turbo”.</p>
<p>The color maps <code>viridis</code>, <code>magma</code>,
<code>inferno</code>, and <code>plasma</code> were created by Stéfan van
der Walt (<a href="https://github.com/stefanv"><span class="citation">@stefanv</span></a>) and Nathaniel Smith (<a href="https://github.com/njsmith"><span class="citation">@njsmith</span></a>). If you want to know more about
the science behind the creation of these color maps, you can watch this
<a href="https://youtu.be/xAoljeRJ3lU">presentation of
<code>viridis</code></a> by their authors at SciPy 2015.</p>
<p>The color map <code>cividis</code> is a corrected version of
viridis, developed by Jamie R. Nuñez, Christopher R. Anderton, and
Ryan S. Renslow, and originally ported to <code>R</code> by Marco
Sciaini (<a href="https://github.com/marcosci"><span class="citation">@msciain</span></a>). More info about
<code>cividis</code> can be found in <a href="https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0199239">this
paper</a>.</p>
<p>The color maps <code>mako</code> and <code>rocket</code> were
originally created for the <code>Seaborn</code> statistical data
visualization package for Python. More info about <code>mako</code> and
<code>rocket</code> can be found on the <a href="https://seaborn.pydata.org/tutorial/color_palettes.html"><code>Seaborn</code>
website</a>.</p>
<p>The color map <code>turbo</code> was developed by Anton Mikhailov to
address the shortcomings of the Jet rainbow color map such as false
detail, banding and color blindness ambiguity. More infor about
<code>turbo</code> can be found <a href="https://ai.googleblog.com/2019/08/turbo-improved-r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GLce++9adasWfXqvvWtb6VDDjmk2M7PB120aFH92GqrrZYmTpxY37ZCgAABAgQIECBAoBQwCVIp4ZUAAQIECBAgMM4E8gRGeRKicpk5c2ZaZZVVys366+OPP57uu++++nZOOk6ePDnl/eUkSCuvvHK/BGiegKhMjq699topJyCvvfbadMMNN6SXvvSlacMNNyziDRWjXmHfyl//+td0zTXXFDFf9KIX1d/fWKZxPSdAH3roofqu3N6BCdD8//zXX399uvPOO1NOpuYJlNZZZ52044471idTqgewQoAAAQIECBAgMG4FJEDH7dDqGAECBAgQIPBsF8gJws033zxVq9WC4qijjkqf+cxnlmL59Kc/nT772c8W+3MiMScL82uewOgHP/hBsf+FL3xhuuqqq+rv3XfffdNNN91UbJ9yyinpV7/6VTr77LPrxz/xiU+kj33sY0PGyIUfeOCB4qrOn/70p/X35pUDDjggHXfccf32NW7kSZDmzJlT33XhhRem/fbbr7596aWXpg984APpuuuuq+8rV1ZdddV02GGHpeOPP764srXc75UAAQIECBAgQGB8CngG6PgcV70iQIAAAQIECKT1118/5URluZx11ln1ZGi5LydHzzzzzHIzveY1r0nTp0+vb0dWcgK0MfmZ37PHHnsM+9acoH3BC16QBiY/8xsvuOCCUIzBKsmJ2v3333/Q5Gcun69qPemkk9Khhx462NvtI0CAAAECBAgQGGcCEqDjbEB1hwABAgQIECDQKPC2t72tvnn33Xenyy+/vL6dVy677LK0YMGC+r7DDz+8vh5dybe+52XLLbdMm2yySdp4443Ti1/84mHffuyxxxZXm5YFd9ttt3TeeecVf3bfffd+t+WXZSKvOe7ixYuLonPnzk0XXXRRcRt87mvjVaI58Ztv2bcQIECAAAECBAiMbwG3wI/v8dU7AgQIECBA4FkusM8++xRXgubkZ17OOOOMlJOL5fLtb3+7XC0SmLvuumt9eyQrRx99dPrUpz5VvKXxuaPLipEnMPrSl75UP7zzzjunfNv6iiuuWOybN29e2mWXXdKVV15ZLxNdaUxqbrvttmmvvfZKK6ywQtpggw3S9ttvn/Lt+VtttVVxC/3s2bOjYZUjQIAAAQIECBAYowKuAB2jA6fZBAgQIECAAIGIQE4ovvWtb60X/f73v19MbpR3PPLII/VnfObt5bn6M78vP1PzQx/6UF4tljzR0HDLLbfcUp9EKZd9//vfX09+5u3c7iOPPDKvjnjJzz0tly984QvFFan5Sthzzz035cmTTjjhhMJkhx12SJMmTSqLeiVAgAABAgQIEBinAhKg43RgdYsAAQIECBAgUArkCX/KKyvzrOw5CZqX7373u+nJJ58s1vMs729+85uL9ZH+temmmxZJ0JG87/bbb+9XfIsttui3nTcaE5lLHRxixxFHHFFc8VkWyTPWn3rqqenggw9OM2bMSPkq169//etFMrQs45UAAQIECBAgQGD8CkiAjt+x1TMCBAgQIECAQCEwa9asYlKgkqOc9Kjx9vdXvepV6TnPeU5ZZESvM2fOHFH5XDjP/t645KtIBy5rrrnmwF2h7YMOOiidfvrpabB25StAf/3rX6ecJN1uu+2Kq2BDQRUiQIAAAQIECBAYswISoGN26DScAAECBAgQIBAXaJwMKU+EdN111xWJwDJCTggu75KvHh3pkp/H2bg8+OCDjZvFeuRZoku96Z878tWsd955Z/re976X8hWweWKmgcv111+fPvaxjw3cbZsAAQIECBAgQGCcCUiAjrMB1R0CBAgQIECAwGACe+65Z9poo42KQ/kqyPy8z1qtVmxvttlm6WUve9lgbwvtW54EaL5tvnH5zW9+07hZrP/2t79dal90R77V/8Yb
<hr />
</div>
<div id="comparison" class="section level1">
<h1>Comparison</h1>
<p>Lets compare the viridis and magma scales against these other
commonly used sequential color palettes in R:</p>
<ul>
<li>Base R palettes: <code>rainbow.colors</code>,
<code>heat.colors</code>, <code>cm.colors</code></li>
<li>The default <strong>ggplot2</strong> palette</li>
<li>Sequential <a href="https://colorbrewer2.org/">colorbrewer</a>
palettes, both default blues and the more viridis-like
yellow-green-blue</li>
</ul>
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABUAAAAPACAYAAAD0ZtPZAAAEDmlDQ1BrQ0dDb2xvclNwYWNlR2VuZXJpY1JHQgAAOI2NVV1oHF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Ke04YYblmUvscQSdb45bUSZv/71r9Pvf//7sj6bbrppWmqppeZ0SXkugrQXXHBBuu6668rFlDbaaKO09tprp2nTpg1ce+edd6Z//OMf9bGqztWBWbNmpb///e/VblnGIossUu/fc8896W9/+1u9v+aaa87mW5+0QYAAAQIECBAg0DoBAdDWdYkKESBAgAABAgTmLHD66aenF7/4xWWmVVddNX3ve99LO+20UxkEjYMRBI0gZayyfuONN6Z///d/T6ecckoZ+JxY8jbbbJO+853vpJVWWqk+FYsgbbLJJvV+XLvrrruW+5dddll66lOfWp+L4OUnPvGJ9JGPfKRe3T1OrrLKKum4445LO+ywQ513so1oyyte8Yp0yy231KdjxfnPfOYz6XWve119rH/j7rvvTm94wxvSSSedNHDPyLPGGmuko48+Ou2yyy71JX/5y19SBFWrFG2IIG2VjjzyyHTAAQdUu+nnP/952nbbbev9Y489Nr3lLW8p9yMwe9NNN9XnbBAgQIAAAQIECLRfwDNA299HakiAAAECBAgQmFIgRidGMDRGgFZpyy23LIOfMSozAqMnn3zypMHPyH/OOeekpz3taSlGQc5L2meffdL73//+2QKRMUL1Oc95TrrqqqumLDZGrEZgtT/4GZkjwBnlfvCDH5zt2mjT85///PS1r31ttntG5hgNGivN77vvvvW1EcyNkaFVOu2006rN8vXMM88c2J+46v2pp55an482xYhYiQABAgQIECBAYHwEBEDHp6/UlAABAgQIECAwm0AEPv/617+mGDUZoxZj6nuMqIwUQcJLLrmkviaCghHM+/73v5922223+vif//znNDHoV5+cy8ZXv/rVtMUWW6QjjjiiHJHZP3IyptIfddRRU5YQ09IXX3zxdNBBB6UzzjgjffzjH09LL710nf9jH/tYuvrqq+v9+++/P+2+++7lVP/q4LOe9awU+Q488MBy1Gl1PEaQfutb36p20wtf+MJ6uz8A+sADD5QjPuuTxUa/RQSYzzrrrPr0HnvsUW/bIECAAAECBAgQGA8BU+DHo5/UkgABAgQIECAwpcDyyy9fPntzxRVXLEeCRlAxUjzr8r3vfW+69NJLy6nhn/70p+syYqGjmNpepQiizkuKkZUxgjLqECkCknHsjjvuKPfnNAI0Mhx//PHpBS94QZk3Rqtuvvnm9bT5anp9BFcjnXDCCWWgtNwp/hNBzwiaVmn//fdPT3/601NMeY8U09Z33nnnMqgaAdD//u//Lo//4he/SPFc0HhEwHnnnTfb6Ndzzz03xb3DMYKhEQSNFMHl/sBxedB/CBAgQIAAAQIEWi9gBGjru0gFCRAgQIAAAQJzFnj729+eIvgZKQKR1RTtZz7zmenggw8uR3x+/vOfrwuJaeIRtKwCpXGiCljWmTI33vzmN9fBz7jk0Y9+dHryk59cXz2n52XOnDmzDn5WFzz72c8uF1Cq9uN5nVWK0aZVimeMfvjDH652y9eVV165fBZpdTBGmMbiSpEiMPrYxz623I5Rn9W095iGX6VqtfuYZh9B0Ej909/jeaZVnuoarwQIECBAgAABAu0XEABtfx+pIQECBAgQIEBgjgKbbbbZHM/HKMxPfepT6UUvelFaffXV0+Me97hyEaEY5VilXq9XbQ71GivQT0wxsrJK/feojlWvk61AH+ee9KQnVVlSTM+v0uWXX15tltPuq0BvfbDYeMYzntG/m6oA6vTp0weCrdU0+CoQGhfFCNIqVdPgf/CDH1SH
<p>It is immediately clear that the “rainbow” palette is not
perceptually uniform; there are several “kinks” where the apparent color
changes quickly over a short range of values. This is also true, though
less so, for the “heat” colors. The other scales are more perceptually
uniform, but “viridis” stands out for its large <em>perceptual
range</em>. It makes as much use of the available color space as
possible while maintaining uniformity.</p>
<p>Now, lets compare these as they might appear under various forms of
colorblindness, which can be simulated using the <strong><a href="https://cran.r-project.org/package=dichromat">dichromat</a></strong>
package:</p>
<div id="green-blind-deuteranopia" class="section level3">
<h3>Green-Blind (Deuteranopia)</h3>
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABUAAAAPACAYAAAD0ZtPZAAAEDmlDQ1BrQ0dDb2xvclNwYWNlR2VuZXJpY1JHQgAAOI2NVV1oHFUUPpu5syskzoPUpqaSDv41lLRsUtGE2uj+ZbNt3CyTbLRBkMns3Z1pJjPj/KR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Sc+8Yn1Y/PV4/URXI30la98pQyUlifFfyLoGUHTKh199NHpqU99aopH3iPFY+t77713GVSNAOh///d/l9d//vOfp3gvaLwi4LLLLlts9eull16aou1wjGBoBEEjRXC5PXBcXvQfAgQIECBAgACBxgtYAdr4KdJBAgQIECBAgMCSBd785jenCH5GikBk9Yj205/+9HT88ceXKz5PO+20upJ4TDyCllWgNG5UAcs6U+bBG97whjr4GUUe9ahHpa233rouvaT3ZW6++eZ18LMq8IxnPKPcQKk6j/d1VilWm1Yp3jH6/ve/vzotv66zzjrlu0iri7HCNDZXihSB0bXXXrs8jlWf1WPv8Rh+lard7uMx+wiCRmp//D3eZ1rlqcr4SoAAAQIECBAg0HwBAdDmz5EeEiBAgAABAgSWKPCEJzxhifdjFebHP/7xdMghh6QNNtggbbTRRuUmQrHKsUqtVqs6XKqvsQP98BQrK6vU3kZ1rfo60g70ce/xj398lSXF4/lVuu6666rD8rH7KtBbXywOnva0p7WfpiqAOmXKlI5ga/UYfBUIjUKxgrRK1WPw3/3ud6tLyePv
</div>
<div id="red-blind-protanopia" class="section level3">
<h3>Red-Blind (Protanopia)</h3>
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABUAAAAPACAYAAAD0ZtPZAAAEDmlDQ1BrQ0dDb2xvclNwYWNlR2VuZXJpY1JHQgAAOI2NVV1oHFUUPpu5syskzoPUpqaSDv41lLRsUtGE2uj+ZbNt3CyTbLRBkMns3Z1pJjPj/KRpKT4UQRDBqOCT4P9bwSchaqvtiy2itFCiBIMo+ND6R6HSFwnruTOzu5O4a73L3PnmnO9+595z7t4LkLgsW5beJQIsGq4t5dPis8fmxMQ6dMF90A190C0rjpUqlSYBG+PCv9rt7yDG3tf2t/f/Z+uuUEcBiN2F2Kw4yiLiZQD+FcWyXYAEQfvICddi+AnEO2ycIOISw7UAVxieD/Cyz5mRMohfRSwoqoz+xNuIB+cj9loEB3Pw2448NaitKSLLRck2q5pOI9O9g/t/tkXda8Tbg0+PszB9FN8D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EAAAPAAAAAALYRw1EAAEAASURBVHgB7N0HvCRFuTjsOsCyC0tUckYEJKMkEQQuqIAESWIWBa96RVFR/Ivhgl6CiYt+ktWLigqIEZGgBBWRZCBIUECigOS0y7Jpvn5bu505YU+d2QGm9zz1+x2mQ1V19VNz5sy+VHUNtIqUJAIECBAgQIAAAQIECBAgQIAAAQIECMyDAvPNg/fklggQIECAAAECBAgQIECAAAECBAgQIFAKCIB6IxAgQIAAAQIECBAgQIAAAQIECBAgMM8KLDDP3pkbI0CAAAECBAgQ6Epg+vTp6a677qrLrrDCCmnhhReu9+dmI+qN+iMtuuiiadlll52b6pQlQIAAAQIECBAgMKqAEaCjEslAgAABAgQIEBhfAjfffHNac801659LLrmkZwCvfe1r63oPPvjgntWrIgIECBAgQIAAAQIjCQiAjiTjOAECBAgQIECAAAECBAgQIECAAAECjRcQAG18F7oBAgQIECBAgAABAgQIECBAgAABAgRGEvAM0JFkHCdAgAABAgQIjFOB9dZbLz300EP13S+22GL1tg0CBAgQIECAAAECTRMQAG1aj2kvAQIECBAgMO4FnnrqqXT//feXDgsssEBabbXV0mOPPZYuuuiitPjii6dtttkmLbjggh1OsfjQn//853Tvvfem2bNnpyWXXDJtuOGGae211+7IFzuzZs1Kjz76aH18oYUWShMmTCj3n3nmmXT33XfX51784heX29OmTUtXX311uuWWW9L6669f1j1p0qQ635w2os4//vGP6aabbirbs/HGG6fJkyfPqUh5LoK0V111VbrnnnvKxZQ22GCDtPrqq6eBgYGOsk8++WT6xz/+UR+r2lwdmDJlSrrvvvuq3bKO+eefv95/+umn09///vd6f5VVVhniW5+0QYAAAQIECBAg0HcCAqB91yUaRIAAAQIECBCYs8D555+fXv/615eZll9++fTTn/40veY1rymDoHEwgqARpIxV1h944IH0n//5n+mcc84pA5+Da95qq63Sj3/847T00kvXp2IRpI022qjej7K77LJLuX/99denzTbbrD4XwcsvfvGL6bOf/Wy9unucXG655dJpp52WXvWqV9V5h9uIe3nLW96SHnnkkfp0rDj/1a9+Ne2///71sfaNqVOnpne/+93prLPO6rhm5FlppZXSKaecknbeeee6yN/+9rcUQdUqxT1EkLZKJ510UvroRz9a7aZLL700bb311vX+qaeemg488MByPwKzDz74YH3OBgECBAgQIECAQP8LeAZo//eRFhIgQIAAAQIERhSI0YkRDI0RoFXafPPNy+BnjMqMwOjZZ589bPAz8l922WVpyy23TDEKspt0wAEHpE996lNDApExQnWnnXZKt99++4jVxojVCKy2Bz8jcwQ4o97DDjtsSNm4p9133z1997vfHXLNyByjQWOl+YMOOqguG8HcGBlapfPOO6/aLF8vvPDCjv3Bq96fe+659fm4pxgRKxEgQIAAAQIECDRHQAC0OX2lpQQIECBAgACBIQIR+LzzzjtTjJqMUYsx9T1GVEaKIOG1115bl4mgYATzfvazn6Vdd921Pn7bbbelwUG/+uQoG9/5znfSJptsko4//vhyRGb7yMmYSn/yySePWENMS584cWI64ogj0gUXXJC+8IUvpEUWWaTO//nPfz7dcccd9f706dPTHnvsUU71rw5uv/32KfIdcsgh5ajT6niMIP3hD39Y7aY999yz3m4PgM6YMaMc8VmfLDbaLSLAfPHFF9en99prr3rbBgECBAgQIECAQDMETIFvRj9pJQECBAgQIEBgRIEllliifPbmUkstVY4EjaBipHjW5Sc+8Yl03XXXlVPDv/KVr9R1xEJHMbW9ShFE7SbFyMoYQRltiBQByTj2xBNPlPtzGgEaGU4//fT0ute9rswbo1Vf9rKX1dPmq+n1EVyNdMYZZ5SB0nKn+E8EPSNoWqWPfOQj6RWveEWKKe+RYtr6jjvuWAZVIwD6v//7v+Xx3/72tymeCxqPCLjiiiuGjH69/PLLU1w7HCMYGkHQSBFcbg8clwf9hwABAgQIECBAoO8FjADt+y7SQAIECBAgQIDAnAU++MEPpgh+RopAZDVFe9ttt01HHnlkOeLzxBNPrCuJaeIRtKwCpXGiCljWmTI33ve+99XBzyjyghe8IK277rp16Tk9L3PNNdesg59VgR122KFcQKnaj+d1VilGm1YpnjH6mc98ptotX5dddtnyWaTVwRhhGosrRYrA6DLLLFNux6jPatp7TMOvUrXafUyzjyBopPbp7/E80ypPVcYrAQIECBAgQIBA/wsIgPZ/H2khAQIECBAgQGCOAi996UvneD5GYX75y19O++yzT1pxxRXTyiuvXC4iFKMcq9RqtarNMb3GCvSDU4ysrFL7Napj1etwK9DHuZe85CVVlhTT86t04403VpvltPsq0FsfLDZe+cpXtu+mKoA633zzdQRbq2nwVSA0CsUI0ipV0+B//vOfV4eS6e81hQ0CBAgQIECA
</div>
<div id="blue-blind-tritanopia" class="section level3">
<h3>Blue-Blind (Tritanopia)</h3>
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABUAAAAPACAYAAAD0ZtPZAAAEDmlDQ1BrQ0dDb2xvclNwYWNlR2VuZXJpY1JHQgAAOI2NVV1oHFUUPpu5syskzoPUpqaSDv41lLRsUtGE2uj+ZbNt3CyTbLRBkMns3Z1pJjPj/KRpKT4UQRDBqOCT4P9bwSchaqvtiy2itFCiBIMo+ND6R6HSFwnruTOzu5O4a73L3PnmnO9+595z7t4LkLgsW5beJQIsGq4t5dPis8fmxMQ6dMF90A190C0rjpUqlSYBG+PCv9rt7yDG3tf2t/f/Z+uuUEcBiN2F2Kw4yiLiZQD+FcWyXYAEQfvICddi+AnEO2ycIOISw7UAVxieD/Cyz5mRMohfRSwoqoz+xNuIB+cj9loEB3Pw2448NaitKSLLRck2q5pOI9O9g/t/tkXda8Tbg0+PszB9FN8DuPaXKnKW4YcQn1Xk3HSIry5ps8UQ/2W5aQnxIwBdu7yFcgrxPsRjVXu8HOh0qao30cArp9SZZxDfg3h1wTzKxu5E/LUxX5wKdX5SnAzmDx4A4OIqLbB69yMesE1pKojLjVdoNsfyiPi45hZmAn3uLWdpOtfQOaVmikEs7ovj8hFWpz7EV6mel0L9Xy23FMYlPYZenAx0yDB1/PX6dledmQjikjkXCxqMJS9WtfFCyH9XtSekEF+2dH+P4tzITduTygGfv58a5VCTH5PtXD7EFZiNyUDBhHnsFTBgE0SQIA9pfFtgo6cKGuhooeilaKH41eDs38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8iMttdRSaaWVVhpPca4lQIAAAQIECBAgMKaAEaBjEslAgAABAgQIEJhYAjfccEOaMWNG/XXxxRd3DODlL395Xe7BBx/csXIVRIAAAQIECBAgQGA0AQHQ0WQcJ0CAAAECBAgQIECAAAECBAgQIEBg4AUEQAe+C90AAQIECBAgQIAAAQIECBAgQIAAAQKjCXgG6GgyjhMgQIAAAQIEJqjABhtskP7xj3/Ud7/00kvX2zYIECBAgAABAgQIDJqAAOig9Zj2EiBAgAABAhNe4NFHH0333HNP6TBlypS05pprpgcffDBddNFFaZlllknbbLNNWmyxxVqcYvGhP/3pT+nuu+9O8+bNS8stt1zaeOON07rrrtuSL3bmzp2bHnjggfr40572tDR16tRy//HHH0933HFHfe45z3lOuT179ux0xRVXpL/+9a9pww03LMuePn16nW9BG1HmH/7wh3T99deX7dl0003TEksssaBLynMRpL388svTnXfeWS6mtNFGG6W11lorDQ0NtVz7yCOPpL///e/1sarN1YGZM2emv/3tb9VuWcbkyZPr/cceeyzddddd9f7qq68+n2990gYBAgQIECBAgEDfCQiA9l2XaBABAgQIECBAYMEC559/fnrlK19ZZlpllVXSD3/4w/Syl72sDILGwQiCRpAyVlm/995703/+53+mc845pwx8Di/5xS9+cfr+97+fVlhhhfpULIK0ySab1Ptx7a677lruX3PNNekFL3hBfS6Cl5/97GfTpz71qXp19zi58sorp9NOOy3tuOOOdd6RNuJeXve616X777+/Ph0rzn/xi19Mb3nLW+pjzRuzZs1Kb3vb29JZZ53VUmfkWW211dIpp5ySdtlll/qSm2++OUVQtUpxDxGkrdJJJ52UPvCBD1S76Ve/+lXaeuut6/1TTz01HXjggeV+BGbvu++++pwNAgQIECBAgACB/hfwDND+7yMtJECAAAECBAiMKhCjEyMYGiNAq7TFFluUwc8YlRmB0bPPPnvE4Gfkv+SSS9ILX/jCFKMgFyYdcMAB6WMf+9h8gcgYobrzzjunW265ZdRiY8RqBFabg5+ROQKcUe6hhx4637VxT3vssUf65je/OV+dkTlGg8ZK8wcddFB9bQRzY2Rolc4777xqs3y98MILW/aHr3p/7rnn1ufjnmJErESAAAECBAgQIDA4AgKgg9NXWkqAAAECBAgQmE8gAp+33XZbilGTMWoxpr7HiMpIESS86qqr6msiKBjBvB/96Edpt912q4/fdNNNaXjQrz45xsY3vvGNtNlmm6Xjjz++HJHZPHIyptKffPLJo5YQ09KnTZuWDj/88HTBBRekz3zmM2nJJZes8x999NHp1ltvrffnzJmT9txzz3Kqf3Vw++23T5Hvgx/8YDnqtDoeI0i/+93vVrtpr732qrebA6BPPPFEOeKzPllsNFtEgPlnP/tZfXrvvfeut20QIECAAAECBAgMhoAp8IPRT1pJgAABAgQIEBhVYNllly2fvbn88suXI0EjqBgpnnX5kY98JF199dXl1PAvfOELdRmx0FFMba9SBFEXJsXIyhhBGW2IFAHJOPbwww+X+wsaARoZTj/99PSKV7yizBujVZ///OfX0+ar6fURXI10xhlnlIHScqf4J4KeETSt0vvf//70ohe9KMWU90gxbX2nnXYqg6oRAP2f//mf8vivf/3rFM8FjUcEXHbZZfONfr300ktT1B2OEQyNIGikCC43B47Lg/4hQIAAAQIECBDoewEjQPu+izSQAAECBAgQILBggfe85z0pgp+RIhBZTdHedttt0xFHHFGO+DzxxBPrQmKaeAQtq0BpnKgClnWmzI13vvOddfAzLnn605+e1l9//frqBT0vc8aMGXXws7pghx12KBdQqvbjeZ1VitGmVYpnjH7yk5+sdsvXlVZaqXwWaXUwRpjG4kqRIjC64oorltsx6rOa9h7T8KtUrXYf0+wjCBqpefp7PM+0ylNd45UAAQIECBAgQKD/BQRA+7+PtJAAAQIECBAgsECB5z3veQs8H6MwP//5z6d99903PfOZz0zPetazykWEYpRjlRqNRrXZ1musQD88xcjKKjXXUR2rXkdagT7OPfe5z62ypJieX6Xrrruu2iyn3VeB3vpgsfGSl7ykeTdVAdRJkya1BFurafBVIDQuihGkVaqmwf/4xz+uDiXT32sK
</div>
<div id="desaturated" class="section level3">
<h3>Desaturated</h3>
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhE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rpqWn755dvyxcmkSZPSc889V16fffbZ0+jRo/Pz119/PT388MPlvXe/+9358WuvvZauu+66dPfdd6eVV145r3vMmDFlvskdRJ033nhjuvPOO/P+rLbaamns2LGTK5LfiyDttddemx555JF8M6VVVlklLbPMMmnUqFFtZV966aX0z3/+s7xW9Lm4MHHixPT4448Xp3kdM888c3n+6quvpkcffbQ8X3LJJQf4ljcdECBAgAABAgQINE5AALRxQ6JDBAgQIECAAIHJC1x00UXpgx/8YJ5pkUUWSb/5zW/SlltumQdB42IEQSNIGbusP/nkk+nf//3f0/nnn58HPvvXvMEGG6Rzzz03LbDAAuWt2ARp/Pjx5XmU3XbbbfPzW2+9Na299trlvQhefv/730/f+c53yt3d4+bCCy+cTj/99LT55puXeQc7iGf52Mc+lp599tnyduw4f9RRR6Xdd9+9vNZ68Morr6TPfvaz6ZxzzmlrM/Isvvji6cQTT0zbbLNNWeS+++5LEVQtUjxDBGmLdPzxx6f99tuvOE1XXHFF2nDDDcvzU045Je211175eQRmn3rqqfKeAwIECBAgQIAAgeYLeAdo88dIDwkQIECAAAECQwrE7MQIhsYM0CKts846efAzZmVGYPS8884bNPgZ+a+88sq0/vrrp5gF2U3aY4890je/+c0BgciYobr11lun+++/f8hqY8ZqBFZbg5+ROQKcUe+BBx44oGw80w477JB+9rOfDWgzMsds0Nhpfu+99y7LRjA3ZoYW6cILLywO889LLrmk7bz/rvcXXHBBeT+eKWbESgQIECBAgAABAr0jIADaO2OlpwQIECBAgACBAQIR+HzwwQdTzJqMWYux9D1mVEaKIOHNN99clomgYATzfvvb36btttuuvH7vvfem/kG/8uYUDn7605+mNddcMx1zzDH5jMzWmZOxlP6EE04YsoZYlj7bbLOlgw8+OF188cXpe9/7XppzzjnL/Icffnh64IEHyvM33ngj7bjjjvlS/+LipptumiLf/vvvn886La7HDNJf/vKXxWnaaaedyuPWAOibb76Zz/gsb2YHrRYRYL7sssvK2zvvvHN57IAAAQIECBAgQKA3BCyB741x0ksCBAgQIECAwJAC8847b/7uzfnnnz+fCRpBxUjxrsuvf/3r6ZZbbsmXhv/oRz8q64iNjmJpe5EiiNpNipmVMYMy+hApApJx7cUXX8zPJzcDNDKceeaZ6QMf+ECeN2arrrHGGuWy+WJ5fQRXI5111ll5oDQ/yf4TQc8ImhZp3333Te9973tTLHmPFMvWt9pqqzyoGgHQ//7v/86v/+Uvf0nxXtB4RcDVV189YPbrVVddlaLtcIxgaARBI0VwuTVwnF/0HwIECBAgQIAAgcYLmAHa+CHSQQIECBAgQIDA5AW+9KUvpQh+RopAZLFEe+ONN06HHHJIPuPzuOOOKyuJZeIRtCwCpXGjCFiWmSoefP7zny+Dn1HkHe94R1pxxRXL0pN7X+a4cePK4GdRYLPNNss3UCrO432dRYrZpkWKd4x++9vfLk7zz4UWWih/F2lxMWaYxuZKkSIwuuCCC+bHMeuzWPYey/CLVOx2H8vsIwgaqXX5e7zPtMhTlPFJgAABAgQIECDQfAEB0OaPkR4SIECAAAECBCYrsPrqq0/2fszC/OEPf5h23XXXtNhii6Ulllgi30QoZjkWqa+vrzjs6DN2oO+fYmZlkVrbKK4Vn4PtQB/33vOe9xRZUizPL9Idd9xRHObL7otAb3kxO3jf+97XepqKAOpMM83UFmwtlsEXgdAoFDNIi1Qsg//d735XXEqWv5cUDggQIECAAAECPSUgANpT
<p>We can see that in these cases, “rainbow” is quite problematic - it
is not perceptually consistent across its range. “Heat” washes out at
bright colors, as do the brewer scales to a lesser extent. The ggplot
scale does not wash out, but it has a low perceptual range - theres not
much contrast between low and high values. The “viridis” and “magma”
scales do better - they cover a wide perceptual range in brightness in
brightness and blue-yellow, and do not rely as much on red-green
contrast. They do less well under tritanopia (blue-blindness), but this
is an extrememly rare form of colorblindness.</p>
<hr />
</div>
</div>
<div id="usage" class="section level1">
<h1>Usage</h1>
<p>The <code>viridis()</code> function produces the <code>viridis</code>
color scale. You can choose the other color scale options using the
<code>option</code> parameter or the convenience functions
<code>magma()</code>, <code>plasma()</code>, <code>inferno()</code>,
<code>cividis()</code>, <code>mako()</code>,
<code>rocket</code>()<code>, and</code>turbo()`.</p>
<p>Here the <code>inferno()</code> scale is used for a raster of U.S.
max temperature:</p>
<div class="sourceCode" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb4-1"><a href="#cb4-1" tabindex="-1"></a><span class="fu">library</span>(terra)</span>
<span id="cb4-2"><a href="#cb4-2" tabindex="-1"></a><span class="fu">library</span>(httr)</span>
<span id="cb4-3"><a href="#cb4-3" tabindex="-1"></a><span class="fu">par</span>(<span class="at">mfrow=</span><span class="fu">c</span>(<span class="dv">1</span>,<span class="dv">1</span>), <span class="at">mar=</span><span class="fu">rep</span>(<span class="fl">0.5</span>, <span class="dv">4</span>))</span>
<span id="cb4-4"><a href="#cb4-4" tabindex="-1"></a>temp_raster <span class="ot">&lt;-</span> <span class="st">&quot;http://ftp.cpc.ncep.noaa.gov/GIS/GRADS_GIS/GeoTIFF/TEMP/us_tmax/us.tmax_nohads_ll_20150219_float.tif&quot;</span></span>
<span id="cb4-5"><a href="#cb4-5" tabindex="-1"></a><span class="fu">try</span>(<span class="fu">GET</span>(temp_raster,</span>
<span id="cb4-6"><a href="#cb4-6" tabindex="-1"></a> <span class="fu">write_disk</span>(<span class="st">&quot;us.tmax_nohads_ll_20150219_float.tif&quot;</span>)), <span class="at">silent=</span><span class="cn">TRUE</span>)</span>
<span id="cb4-7"><a href="#cb4-7" tabindex="-1"></a>us <span class="ot">&lt;-</span> <span class="fu">rast</span>(<span class="st">&quot;us.tmax_nohads_ll_20150219_float.tif&quot;</span>)</span>
<span id="cb4-8"><a href="#cb4-8" tabindex="-1"></a>us <span class="ot">&lt;-</span> <span class="fu">project</span>(us, <span class="at">y=</span><span class="st">&quot;+proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=37.5 +lon_0=-96 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs&quot;</span>)</span>
<span id="cb4-9"><a href="#cb4-9" tabindex="-1"></a><span class="fu">image</span>(us, <span class="at">col=</span><span class="fu">inferno</span>(<span class="dv">256</span>), <span class="at">asp=</span><span class="dv">1</span>, <span class="at">axes=</span><span class="cn">FALSE</span>, <span class="at">xaxs=</span><span class="st">&quot;i&quot;</span>, <span class="at">xaxt=</span><span class="st">&#39;n&#39;</span>, <span class="at">yaxt=</span><span class="st">&#39;n&#39;</span>, <span class="at">ann=</span><span class="cn">FALSE</span>)</span></code></pre></div>
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABUAAAAPACAYAAAD0ZtPZAAAEDmlDQ1BrQ0dDb2xvclNwYWNlR2VuZXJpY1JHQgAAOI2NVV1oHFUUPpu5syskzoPUpqaSDv41lLRsUtGE2uj+ZbNt3CyTbLRBkMns3Z1pJjPj/KRpKT4UQRDBqOCT4P9bwSchaqvtiy2itFCiBIMo+ND6R6HSFwnruTOzu5O4a73L3PnmnO9+595z7t4LkLgsW5beJQIsGq4t5dPis8fmxMQ6dMF90A190C0rjpUqlSYBG+PCv9rt7yDG3tf2t/f/Z+uuUEcBiN2F2Kw4yiLiZQD+FcWyXYAEQfvICddi+AnEO2ycIOISw7UAVxieD/Cyz5mRMohfRSwoqoz+xNuIB+cj9loEB3Pw2448NaitKSLLRck2q5pOI9O9g/t/tkXda8Tbg0+PszB9FN8DuPaXKnKW4YcQn1Xk3HSIry5ps8UQ/2W5aQnxIwBdu7yFcgrxPsRjVXu8HOh0qao30cArp9SZZxDfg3h1wTzKxu5E/LUxX5wKdX5SnAzmDx4A4OIqLbB69yMesE1pKojLjVdoNsfyiPi45hZmAn3uLWdpOtfQOaVmikEs7ovj8hFWpz7EV6mel0L9Xy23FMYlPYZenAx0yDB1/PX6dledmQjikjkXCxqMJS9WtfFCyH9XtSekEF+2dH+P4tzITduTygGfv58a5VCTH5PtXD7EFZiNyUDBhHnsFTBgE0SQIA9pfFtgo6cKGuhooeilaKH41eDs38Ip+f4At1Rq/sjr6NEwQqb/I/DQqsLvaFUjvAx+eWirddAJZnAj1DFJL0mSg/gcI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IECBAgQIAAAQIECBAgQIAAAQIEHIBaAwQIECBAgAABAgQIECBAgAABAgQInKyAA9CTnVqFESBAgAABAgQIECBAgAABAgQIECDgANQaIECAAAECBAgQIECAAAECBAgQIEDgZAUcgJ7s1CqMAAECBAgQIECAAAECBAgQIECAAAEHoNYAAQIECBAgQIAAAQIECBAgQIAAAQInK+AA9GSnVmEECBAgQIAAAQIECBAgQIAAAQIECDgAtQYIECBAgAABAgQIECBAgAABAgQIEDhZAQegJzu1CiNAgAABAgQIECBAgAABAgQIECBAwAGoNUCAAAECBAgQIECAAAECBAgQIECAwMkKOAA92alVGAECBAgQIECAAAECBAgQIECAAAECDkCtAQIECBAgQIAAAQIECBAgQIAAAQIETlagP9nKFEaAAAECBAgQIECAAAECBAgcpMD/9j//L2Fe//l//1/DuCABAgTuI+AA9D5ariVAgAABAgQIECBAgAABAgT2Fvi//4//sncfOiBAgMBdBfy/wN9VynUECBAgQIAAAQIECBAgQIAAAQIECBydgAPQo5syCRMgQIAAAQIECBAgQIAAAQIECBAgcFcBB6B3lXIdAQIECBAgQIAAAQIECBAgQIAAAQJHJ+AA9OimTMIECBAgQIAAAQIECBAgQIAAAQIECNxVwAHoXaVcR4AAAQIECBAgQIAAAQIECBAgQIDA0Qk4AD26KZMwAQIECBAgQIAAAQIECBAgQIAAAQJ3FXAAelcp1xEgQIAAAQIECBAgQIAAAQIECBAgcHQCDkCPbsokTIAAAQIECBAgQIAAAQIECBAgQIDAXQWaefe568WuI0DgPATevn5TLfTdh/fVmAABAgQIECBAgAABAqcjEP274Lmr9O+S554B4xM4LgH/BehxzZdsCRAgQIAAAQIECBAgQIAAAQIECBC4h4AD0HtguZQAAQIECBAgQIAAAQIECBAgQIAAgeMScAB6XPMlWwIECBAgQIAAAQIECBAgQIAAAQIE7iHgAPQeWC4lQIAAAQIECBAgQIAAAQIECBAgQOC4BByAHtd8yZYAAQIECBAgQIAAAQIECBAgQIAAgXsIOAC9B5ZLCRAgQIAAAQIECBAgQIAAAQIECBA4LgEHoMc1X7IlQIAAAQIECBAgQIAAAQIECBAgQOAeAg5A74HlUgIECBAgQIAAAQIECBAgQIAAAQIEjkugP650ZUuAwGMIvH395sHd7NP2LoO++/D+Lpe5hgABAgQIECBAgACBROCp392T4YUJECBwMAL+C9CDmQqJECBAgAABAgQIECBAgAABAgQIECDw2AIOQB9bVH8ECBAgQIAAAQIECBAgQIAAAQIECByMgAPQg5kKiRAgQIAAAQIECBAgQIAAAQIECBAg8NgCDkAfW1R/BAgQIECAAAECBAgQIECAAAECBAgcjIAD0IOZCokQIECAAAECBAgQIECAAAECBAgQIPDYAg5AH1tUfwQIECBAgAABAgQIECBAgAABAgQIHIyAA9CDmQqJECBAgAABAgQIECBAgAABAgQIECDw2AIOQB9bVH8ECBAgQIAAAQIECBAgQIAAAQIECByMQDPvPgeTjUQIEPguAm9fv/ku4xzaIO8+vD+0lORDgAABAgQIECBw4gLn+u79nNPqvf859Y1N4DAF/BeghzkvsiJAgAABAgQIECBAgAABAgQIECBA4BEEHIA+AqIuCBAgQIAAAQIECBAgQIAAAQIECBA4TAEHoIc5L7IiQIAAAQIECBAgQIAAAQIECBAgQOARBByAPgKiLggQIECAAAECBAgQIECAAAECBAgQOEwBB6CHOS+yIkCAAAECBAgQIECAAAECBAgQIEDgEQQcgD4Coi4IECBAgAABAgQIECBAgAABAgQIEDhMAQeghzkvsiJAgAABAgQIECBAgAABAgQIECBA4BEEHIA+AqIuCBAgQIAAAQIECBAgQIAAAQIECBA4TAEHoIc5L7IiQIAAAQIECBAgQIAAAQIECBAgQOARBPpH6EMXBAgQOAqBt6/fPGme7z68f9L+dU6AAAECBAgQIPD4Ak/9jvj4GeuRAAECBO4r4L8Ava+Y6wkQIECAAAECBAgQIECAAAECBAgQOBoBB6BH
<p>The package also contains color scale functions for
<strong>ggplot</strong> plots: <code>scale_color_viridis()</code> and
<code>scale_fill_viridis()</code>. As with <code>viridis()</code>, you
can use the other scales with the <code>option</code> argument in the
<code>ggplot</code> scales.<br />
Here the “magma” scale is used for a cloropleth map of U.S.
unemployment:</p>
<div class="sourceCode" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb5-1"><a href="#cb5-1" tabindex="-1"></a><span class="fu">library</span>(maps)</span></code></pre></div>
<pre><code>##
## Attaching package: &#39;maps&#39;</code></pre>
<pre><code>## The following object is masked from &#39;package:viridis&#39;:
##
## unemp</code></pre>
<div class="sourceCode" id="cb8"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb8-1"><a href="#cb8-1" tabindex="-1"></a><span class="fu">library</span>(mapproj)</span>
<span id="cb8-2"><a href="#cb8-2" tabindex="-1"></a></span>
<span id="cb8-3"><a href="#cb8-3" tabindex="-1"></a><span class="fu">data</span>(unemp, <span class="at">package =</span> <span class="st">&quot;viridis&quot;</span>)</span>
<span id="cb8-4"><a href="#cb8-4" tabindex="-1"></a></span>
<span id="cb8-5"><a href="#cb8-5" tabindex="-1"></a>county_df <span class="ot">&lt;-</span> <span class="fu">map_data</span>(<span class="st">&quot;county&quot;</span>, <span class="at">projection =</span> <span class="st">&quot;albers&quot;</span>, <span class="at">parameters =</span> <span class="fu">c</span>(<span class="dv">39</span>, <span class="dv">45</span>))</span>
<span id="cb8-6"><a href="#cb8-6" tabindex="-1"></a><span class="fu">names</span>(county_df) <span class="ot">&lt;-</span> <span class="fu">c</span>(<span class="st">&quot;long&quot;</span>, <span class="st">&quot;lat&quot;</span>, <span class="st">&quot;group&quot;</span>, <span class="st">&quot;order&quot;</span>, <span class="st">&quot;state_name&quot;</span>, <span class="st">&quot;county&quot;</span>)</span>
<span id="cb8-7"><a href="#cb8-7" tabindex="-1"></a>county_df<span class="sc">$</span>state <span class="ot">&lt;-</span> state.abb[<span class="fu">match</span>(county_df<span class="sc">$</span>state_name, <span class="fu">tolower</span>(state.name))]</span>
<span id="cb8-8"><a href="#cb8-8" tabindex="-1"></a>county_df<span class="sc">$</span>state_name <span class="ot">&lt;-</span> <span class="cn">NULL</span></span>
<span id="cb8-9"><a href="#cb8-9" tabindex="-1"></a></span>
<span id="cb8-10"><a href="#cb8-10" tabindex="-1"></a>state_df <span class="ot">&lt;-</span> <span class="fu">map_data</span>(<span class="st">&quot;state&quot;</span>, <span class="at">projection =</span> <span class="st">&quot;albers&quot;</span>, <span class="at">parameters =</span> <span class="fu">c</span>(<span class="dv">39</span>, <span class="dv">45</span>))</span>
<span id="cb8-11"><a href="#cb8-11" tabindex="-1"></a></span>
<span id="cb8-12"><a href="#cb8-12" tabindex="-1"></a>choropleth <span class="ot">&lt;-</span> <span class="fu">merge</span>(county_df, unemp, <span class="at">by =</span> <span class="fu">c</span>(<span class="st">&quot;state&quot;</span>, <span class="st">&quot;county&quot;</span>))</span>
<span id="cb8-13"><a href="#cb8-13" tabindex="-1"></a>choropleth <span class="ot">&lt;-</span> choropleth[<span class="fu">order</span>(choropleth<span class="sc">$</span>order), ]</span>
<span id="cb8-14"><a href="#cb8-14" tabindex="-1"></a></span>
<span id="cb8-15"><a href="#cb8-15" tabindex="-1"></a><span class="fu">ggplot</span>(choropleth, <span class="fu">aes</span>(long, lat, <span class="at">group =</span> group)) <span class="sc">+</span></span>
<span id="cb8-16"><a href="#cb8-16" tabindex="-1"></a> <span class="fu">geom_polygon</span>(<span class="fu">aes</span>(<span class="at">fill =</span> rate), <span class="at">colour =</span> <span class="fu">alpha</span>(<span class="st">&quot;white&quot;</span>, <span class="dv">1</span> <span class="sc">/</span> <span class="dv">2</span>), <span class="at">linewidth =</span> <span class="fl">0.2</span>) <span class="sc">+</span></span>
<span id="cb8-17"><a href="#cb8-17" tabindex="-1"></a> <span class="fu">geom_polygon</span>(<span class="at">data =</span> state_df, <span class="at">colour =</span> <span class="st">&quot;white&quot;</span>, <span class="at">fill =</span> <span class="cn">NA</span>) <span class="sc">+</span></span>
<span id="cb8-18"><a href="#cb8-18" tabindex="-1"></a> <span class="fu">coord_fixed</span>() <span class="sc">+</span></span>
<span id="cb8-19"><a href="#cb8-19" tabindex="-1"></a> <span class="fu">theme_minimal</span>() <span class="sc">+</span></span>
<span id="cb8-20"><a href="#cb8-20" tabindex="-1"></a> <span class="fu">ggtitle</span>(<span class="st">&quot;US unemployment rate by county&quot;</span>) <span class="sc">+</span></span>
<span id="cb8-21"><a href="#cb8-21" tabindex="-1"></a> <span class="fu">theme</span>(<span class="at">axis.line =</span> <span class="fu">element_blank</span>(), <span class="at">axis.text =</span> <span class="fu">element_blank</span>(),</span>
<span id="cb8-22"><a href="#cb8-22" tabindex="-1"></a> <span class="at">axis.ticks =</span> <span class="fu">element_blank</span>(), <span class="at">axis.title =</span> <span class="fu">element_blank</span>()) <span class="sc">+</span></span>
<span id="cb8-23"><a href="#cb8-23" tabindex="-1"></a> <span class="fu">scale_fill_viridis</span>(<span class="at">option=</span><span class="st">&quot;magma&quot;</span>)</span></code></pre></div>
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABUAAAAPACAYAAAD0ZtPZAAAEDmlDQ1BrQ0dDb2xvclNwYWNlR2VuZXJpY1JHQgAAOI2NVV1oHFUUPpu5syskzoPUpqaSDv41lLRsUtGE2uj+ZbNt3CyTbLRBkMns3Z1pJjPj/KRpKT4UQRDBqOCT4P9bwSchaqvtiy2itFCiBIMo+ND6R6HSFwnruTOzu5O4a73L3PnmnO9+595z7t4LkLgsW5beJQIsGq4t5dPis8fmxMQ6dMF90A190C0rjpUqlSYBG+PCv9rt7yDG3tf2t/f/Z+uuUEcBiN2F2Kw4yiLiZQD+FcWyXYAEQfvICddi+AnEO2ycIOISw7UAVxieD/Cyz5mRMohfRSwoqoz+xNuIB+cj9loEB3Pw2448NaitKSLLRck2q5pOI9O9g/t/tkXda8Tbg0+PszB9FN8DuPaXKnKW4YcQn1Xk3HSIry5ps8UQ/2W5aQnxIwBdu7yFcgrxPsRjVXu8HOh0qao30cArp9SZZxDfg3h1wTzKxu5E/LUxX5wKdX5SnAzmDx4A4OIqLbB69yMesE1pKojLjVdoNsfyiPi45hZmAn3uLWdpOtfQOaVmikEs7ovj8h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AQQQQAABBBBAAAEEEEAAAQQQQAABBBJWgABowlYtN4YAAggggAACCCCAAAIIIIAAAggggAACBEB5BhBAAAEEEEAAAQQQQAABBBBAAAEEEEAgYQUIgCZs1XJj
<p>The ggplot functions also can be used for discrete scales with the
argument <code>discrete=TRUE</code>.</p>
<div class="sourceCode" id="cb9"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb9-1"><a href="#cb9-1" tabindex="-1"></a>p <span class="ot">&lt;-</span> <span class="fu">ggplot</span>(mtcars, <span class="fu">aes</span>(wt, mpg))</span>
<span id="cb9-2"><a href="#cb9-2" tabindex="-1"></a>p <span class="sc">+</span> <span class="fu">geom_point</span>(<span class="at">size=</span><span class="dv">4</span>, <span class="fu">aes</span>(<span class="at">colour =</span> <span class="fu">factor</span>(cyl))) <span class="sc">+</span></span>
<span id="cb9-3"><a href="#cb9-3" tabindex="-1"></a> <span class="fu">scale_color_viridis</span>(<span class="at">discrete=</span><span class="cn">TRUE</span>) <span class="sc">+</span></span>
<span id="cb9-4"><a href="#cb9-4" tabindex="-1"></a> <span class="fu">theme_bw</span>()</span></code></pre></div>
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABUAAAAPACAYAAAD0ZtPZAAAEDmlDQ1BrQ0dDb2xvclNwYWNlR2VuZXJpY1JHQgAAOI2NVV1oHFUUPpu5syskzoPUpqaSDv41lLRsUtGE2uj+ZbNt3CyTbLRBkMns3Z1pJjPj/KRpKT4UQRDBqOCT4P9bwSchaqvtiy2itFCiBIMo+ND6R6HSFwnruTOzu5O4a73L3PnmnO9+595z7t4LkLgsW5beJQIsGq4t5dPis8fmxMQ6dMF90A190C0rjpUqlSYBG+PCv9rt7yDG3tf2t/f/Z+uuUEcBiN2F2Kw4yiLiZQD+FcWyXYAEQfvICddi+AnEO2ycIOISw7UAVxieD/Cyz5mRMohfRSwoqoz+xNuIB+cj9loEB3Pw2448NaitKSLLRck2q5pOI9O9g/t/tkXda8Tbg0+PszB9FN8DuPaXKnKW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aa5wLfyQr5D+a11pnE2hbAu3bSnd33nnnrKujR49ucpcHDBiQnZt+MCn8T6vJFzuRAAECBAgQIECAAAECBAgQIECAAIGyC9TMDNA0s3PcuHFx5JFHRiFxWVc3/RUmlbrPyEgrtKdV39PiSOutt152vO4/kyZNyl6mv96k2aIKAQIECBAgQIAAAQIECBAgQIAAAQLVJVAzM0CfffbZuPfee+ORRx5pcARGjRqV7d9oo42Kx++///5IzwpNydOGyuOPP57t3nzzzRs6bB8BAgQIECBAgAABAgQIECBAgAABAhUuUDMJ
</div>
<div id="gallery" class="section level1">
<h1>Gallery</h1>
<p>Here are some examples of viridis being used in the wild:</p>
<p>James Curley uses <strong>viridis</strong> for matrix plots (<a href="https://gist.github.com/jalapic/9a1c069aa8cee4089c1e">Code</a>):</p>
<p><a href="http://pbs.twimg.com/media/CQWw9EgWsAAoUi0.png"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABLAAAAHTCAIAAAC4G3bLAAAgAElEQVR4XuxdB5zUxPfPpG2/znEHx9GLICCCCNixARYUUf6AgijFgoBYwE5TFEEURJogIoqiICAWsAFKL6IgotI7XN2WTc//TbI9u5Tfj58138/A7SYvb968eWUmO8mgY8eObdq0yW63a5pGWLBgwYIFC/8aqKrqdDrr1q27bds2lmWtPGjBggULFv6FQEuXLr399turV68uy3LySQsWLFiwYOGfC1EUa9euPWTIkP79++fm5lp50IIFCxYs/AuBVqxYcd9991WtWlVRlOST5xyIpCky+aAOVZHV9HdmESIR0tS0FIikgK8GTUhBgRBNUYSmKkra608DhCiEVE09s3vHiKIpEFZWNP2DIqcS6myAKArqD385taKMxprbSlI0SYBIavzB/xhI17deySlEOQvo/NBpmnYqAAOSjOpIh6oq6Q3mP0NCRxg4CyVEjD/5EqSzPW3PpgGCdhPYNXQVEv+9taWE2X6gXlB5kqX91/1owcIfDUmSatSo0bdv32HDhmVlZVl5MC2sPJgIKw9GcRZKsPKgBQt/VaDly5f369evoKDgf58IEaEK3kq/rDsJ0iNK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s0bV3846ZpGLh+vUPihZ4Wt0eq1hevWrVn56uM98lDILxJ3jFm87OXuwTL2vlcXbdy4cd3a9Zu3bPjq82VLP1t6b5vqoZAXORveP2bOug1Yq/MnPtzUQwmyqNpyn33
<p>Christopher Moore created these contour plots of potential in a
dynamic plankton-consumer model:</p>
<p><a href="http://pbs.twimg.com/media/CQWTy7wWcAAa-gu.jpg"><img src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAGQAyADASIAAhEBAxEB/8QAHAABAAIDAQEBAAAAAAAAAAAAAAMFAgQGAQcI/8QAXxAAAQMCAwMHBAsLCgUDAQcFAQACAwQRBRIhMUFhBhMiUXGBkRQWMqEHI0JSU2JylbHB0zM1NkNUc3SCkrTRFSRHdYWissLD8DREY9LhJUaDk0VVlKOz4uPxF2Sk8v/EABoBAQEBAQEBAQAAAAAAAAAAAAADAgQBBQb/xAAxEQEAAgIABQMDAwMDBQAAAAAAAQIDEQQSITFBE1HwIjJhBUJxkbHxUoHBFCNiodH/2gAMAwEAAhEDEQA/APv6IiAiIgIiICIqjzjw8ySsY2uk5uR0TnRYfO9uZpLXAOawg2II0O5BboqnzhovgMT+a6n7NPOGi+AxP5rqfs0FsiqfOGi+AxP5rqfs084aL4DE/mup+zQWyKp84aL4DE/mup+zTzhovgMT+a6n7NBbIqnzhovgMT+a6n7NPOGi+AxP5rqfs0FsiqfOGi+AxP5rqfs084aL4DE/mup+zQWyKp84aL4DE/mup+zTzhovgMT+a6n7NBbIqnzhovgMT+a6n7NPOGi+AxP5rqfs0FsiqfOGi+AxP5rqfs084aL4DE/mup+zQWyKp84aL4DE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9wQWKxc5rWlziAALkk6AL5JjfsyuLzFgVAMuo5+rHrDGnZ2nuXz7FeUON48++JYhPO0m/NZrMA+QOiRxAuqRjme73Xu+8Yry/5M4QDz+KQzPH4umPOm/UcugPaQuOxD2Z2Z3RYZgz3m3RfUyhv90Xv+0F8qZBYaWtrb/wdh7CpWwXdlyjZqMpOvydo7lSMdY7szesOlxD2S+VWIteW1rKOIX0pYgLW6ybu8Cucra3EcSZnxGtqKk7LzyukZ2XJuApGwBxOgNtNLm3eOkO8d6mjhzEuABsdoHfqW/WFqOWOyc54jsruYAZcg5Tb0tW+I1HepHQHm3GxLbX6QzN8Rqt+ODM67MpO/ILnvLNfFqk5kF+oZnPZf1FrvUnNCc52i2A2s3MR8Uh4/ivWQjMWiwIPotcWnwcrF1PZt5GgW+EbY7Pjhp/vKRsD7HKC9vAOc36HBec6c51cacutnY4jb0o7+tpSOJttcocdzZi31O2Kw8nY12vNtN7a5R3k3b6gpmQPI6GZ7dmmdw7vSHgs+oxOZWCnedjnW/Pt/io5KXQg5D8uYEd4BV15JINTGBf3zHD6Y1iadwOgZ3Nd9UaepDz15UfMl7NMxGukbdL9p2qEU1y6LKDb3DTcW4lXstITq9ht1va8j+9YLX8n5xuga7gBmt3N08SV7GSG4zqN8PRLzY5NHO3N6wOv1rcw7GsZwB2bDcQqKVrSHFjXHIR1lp0J7Qtp0N25zbTabg23bfRb3X71rvpb6bDbo6E68L6uPE6L3miVq530HAfZmliyw8oaEEDR1TS7dl9WH6j3L6hhON4ZjlKKnDKyKpj35D0m8HDaD2r8xSUwvfTQD3Wlr69vWT3LGirK/Bq1lXh1VLTVDCLPY6xPAjYRwOmqzOOJ7L1vWz9YIvmHI72WqXEnR0GPhlJWGzWVI0ikPH3p9XZoF9PUZiY7vREReAiIgIiIC
</div>
<!-- code folding -->
<!-- dynamically load mathjax for compatibility with self-contained -->
<script>
(function () {
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
document.getElementsByTagName("head")[0].appendChild(script);
})();
</script>
</body>
</html>