Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c5f285a

Browse files
committed
DOC: hot fix for missing images is colormaps page
1 parent fab9811 commit c5f285a

File tree

2 files changed

+98
-4
lines changed

2 files changed

+98
-4
lines changed

1.4.3/users/colormaps.html

Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,19 +192,66 @@ <h3>Miscellaneous<a class="headerlink" href="#miscellaneous" title="Permalink to
192192
<p>Some of the miscellaneous colormaps have particular uses they have been created for. For example, gist_earth, ocean, and terrain all seem to be created for plotting topography (green/brown) and water depths (blue) together. We would expect to see a divergence in these colormaps, then, but multiple kinks may not be ideal, such as in gist_earth and terrain. CMRmap was created to convert well to grayscale, though it does appear to have some small kinks in <img src="../_images/mathmpl/math-374b544f7d.png" style="position: relative; bottom: -3px"/>. cubehelix was created to vary smoothly in both lightness and hue, but appears to have a small hump in the green hue area.</p>
193193
<p>The often-used jet colormap is included in this set of colormaps. We can see that the <img src="../_images/mathmpl/math-374b544f7d.png" style="position: relative; bottom: -3px"/> values vary widely throughout the colormap, making it a poor choice for representing data for viewers to see perceptually. See an extension on this idea at <a class="reference internal" href="#mycarta-jet" id="id6">[mycarta-jet]</a>.</p>
194194
<p>(<a class="reference external" href="../users/plotting/colormaps/lightness.py">Source code</a>)</p>
195+
<div class="figure">
196+
<img alt="../_images/lightness_00.png" src="../_images/lightness_00.png" />
197+
<p class="caption">(<a class="reference external" href="../users/plotting/colormaps/lightness_00.png">png</a>, <a class="reference external" href="../users/plotting/colormaps/lightness_00.hires.png">hires.png</a>, <a class="reference external" href="../users/plotting/colormaps/lightness_00.pdf">pdf</a>)</p>
198+
</div>
199+
<div class="figure">
200+
<img alt="../_images/lightness_01.png" src="../_images/lightness_01.png" />
201+
<p class="caption">(<a class="reference external" href="../users/plotting/colormaps/lightness_01.png">png</a>, <a class="reference external" href="../users/plotting/colormaps/lightness_01.hires.png">hires.png</a>, <a class="reference external" href="../users/plotting/colormaps/lightness_01.pdf">pdf</a>)</p>
202+
</div>
203+
<div class="figure">
204+
<img alt="../_images/lightness_02.png" src="../_images/lightness_02.png" />
205+
<p class="caption">(<a class="reference external" href="../users/plotting/colormaps/lightness_02.png">png</a>, <a class="reference external" href="../users/plotting/colormaps/lightness_02.hires.png">hires.png</a>, <a class="reference external" href="../users/plotting/colormaps/lightness_02.pdf">pdf</a>)</p>
206+
</div>
207+
<div class="figure">
208+
<img alt="../_images/lightness_03.png" src="../_images/lightness_03.png" />
209+
<p class="caption">(<a class="reference external" href="../users/plotting/colormaps/lightness_03.png">png</a>, <a class="reference external" href="../users/plotting/colormaps/lightness_03.hires.png">hires.png</a>, <a class="reference external" href="../users/plotting/colormaps/lightness_03.pdf">pdf</a>)</p>
210+
</div>
211+
<div class="figure">
212+
<img alt="../_images/lightness_04.png" src="../_images/lightness_04.png" />
213+
<p class="caption">(<a class="reference external" href="../users/plotting/colormaps/lightness_04.png">png</a>, <a class="reference external" href="../users/plotting/colormaps/lightness_04.hires.png">hires.png</a>, <a class="reference external" href="../users/plotting/colormaps/lightness_04.pdf">pdf</a>)</p>
214+
</div>
195215
</div>
196216
</div>
197217
<div class="section" id="function">
198218
<h2><img src="../_images/mathmpl/math-374b544f7d.png" style="position: relative; bottom: -3px"/> function<a class="headerlink" href="#function" title="Permalink to this headline"></a></h2>
199219
<p>There are multiple approaches to finding the best function for <img src="../_images/mathmpl/math-374b544f7d.png" style="position: relative; bottom: -3px"/> across a colormap. Linear gives reasonable results (<em>e.g.</em>, <a class="reference internal" href="#mycarta-banding" id="id7">[mycarta-banding]</a>, <a class="reference internal" href="#mycarta-lablinear" id="id8">[mycarta-lablinear]</a>). However, the Weber-Fechner law, and more generally and recently, Stevens&#8217; Law, indicates that a logarithmic or geometric relationship might be better (see effort on this front at <a class="reference internal" href="#mycarta-cubelaw" id="id9">[mycarta-cubelaw]</a>).</p>
200-
<p>(<a class="reference external" href="../users/plotting/colormaps/Lfunction.py">Source code</a>)</p>
220+
<p>(<a class="reference external" href="../users/plotting/colormaps/Lfunction.py">Source code</a>, <a class="reference external" href="../users/plotting/colormaps/Lfunction_00_00.png">png</a>, <a class="reference external" href="../users/plotting/colormaps/Lfunction_00_00.hires.png">hires.png</a>, <a class="reference external" href="../users/plotting/colormaps/Lfunction_00_00.pdf">pdf</a>)</p>
221+
<div class="figure">
222+
<img alt="../_images/Lfunction_00_00.png" src="../_images/Lfunction_00_00.png" />
223+
</div>
224+
<p>(<a class="reference external" href="../users/plotting/colormaps/Lfunction_01_00.png">png</a>, <a class="reference external" href="../users/plotting/colormaps/Lfunction_01_00.hires.png">hires.png</a>, <a class="reference external" href="../users/plotting/colormaps/Lfunction_01_00.pdf">pdf</a>)</p>
225+
<div class="figure">
226+
<img alt="../_images/Lfunction_01_00.png" src="../_images/Lfunction_01_00.png" />
227+
</div>
201228
</div>
202229
<div class="section" id="grayscale-conversion">
203230
<h2>Grayscale conversion<a class="headerlink" href="#grayscale-conversion" title="Permalink to this headline"></a></h2>
204231
<p>Conversion to grayscale is important to pay attention to for printing publications that have color plots. If this is not paid attention to ahead of time, your readers may end up with indecipherable plots because the grayscale changes unpredictably through the colormap.</p>
205232
<p>Conversion to grayscale is done in many different ways <a class="reference internal" href="#bw" id="id10">[bw]</a>. Some of the better ones use a linear combination of the rgb values of a pixel, but weighted according to how we perceive color intensity. A nonlinear method of conversion to grayscale is to use the <img src="../_images/mathmpl/math-374b544f7d.png" style="position: relative; bottom: -3px"/> values of the pixels. In general, similar principles apply for this question as they do for presenting one&#8217;s information perceptually; that is, if a colormap is chosen that has monotonically increasing in <img src="../_images/mathmpl/math-374b544f7d.png" style="position: relative; bottom: -3px"/> values, it will print in a reasonable manner to grayscale.</p>
206233
<p>With this in mind, we see that the Sequential colormaps have reasonable representations in grayscale. Some of the Sequential2 colormaps have decent enough grayscale representations, though some (autumn, spring, summer, winter) have very little grayscale change. If a colormap like this was used in a plot and then the plot was printed to grayscale, a lot of the information may map to the same gray values. The Diverging colormaps mostly vary from darker gray on the outer edges to white in the middle. Some (PuOr and seismic) have noticably darker gray on one side than the other and therefore are not very symmetric. coolwarm has little range of gray scale and would print to a more uniform plot, losing a lot of detail. Note that overlaid, labeled contours could help differentiate between one side of the colormap vs. the other since color cannot be used once a plot is printed to grayscale. Many of the Qualitative and Miscellaneous colormaps, such as Accent, hsv, and jet, change from darker to lighter and back to darker gray throughout the colormap. This would make it impossible for a viewer to interpret the information in a plot once it is printed in grayscale.</p>
207234
<p>(<a class="reference external" href="../users/plotting/colormaps/grayscale.py">Source code</a>)</p>
235+
<div class="figure">
236+
<img alt="../_images/grayscale_00.png" src="../_images/grayscale_00.png" />
237+
<p class="caption">(<a class="reference external" href="../users/plotting/colormaps/grayscale_00.png">png</a>, <a class="reference external" href="../users/plotting/colormaps/grayscale_00.hires.png">hires.png</a>, <a class="reference external" href="../users/plotting/colormaps/grayscale_00.pdf">pdf</a>)</p>
238+
</div>
239+
<div class="figure">
240+
<img alt="../_images/grayscale_01.png" src="../_images/grayscale_01.png" />
241+
<p class="caption">(<a class="reference external" href="../users/plotting/colormaps/grayscale_01.png">png</a>, <a class="reference external" href="../users/plotting/colormaps/grayscale_01.hires.png">hires.png</a>, <a class="reference external" href="../users/plotting/colormaps/grayscale_01.pdf">pdf</a>)</p>
242+
</div>
243+
<div class="figure">
244+
<img alt="../_images/grayscale_02.png" src="../_images/grayscale_02.png" />
245+
<p class="caption">(<a class="reference external" href="../users/plotting/colormaps/grayscale_02.png">png</a>, <a class="reference external" href="../users/plotting/colormaps/grayscale_02.hires.png">hires.png</a>, <a class="reference external" href="../users/plotting/colormaps/grayscale_02.pdf">pdf</a>)</p>
246+
</div>
247+
<div class="figure">
248+
<img alt="../_images/grayscale_03.png" src="../_images/grayscale_03.png" />
249+
<p class="caption">(<a class="reference external" href="../users/plotting/colormaps/grayscale_03.png">png</a>, <a class="reference external" href="../users/plotting/colormaps/grayscale_03.hires.png">hires.png</a>, <a class="reference external" href="../users/plotting/colormaps/grayscale_03.pdf">pdf</a>)</p>
250+
</div>
251+
<div class="figure">
252+
<img alt="../_images/grayscale_04.png" src="../_images/grayscale_04.png" />
253+
<p class="caption">(<a class="reference external" href="../users/plotting/colormaps/grayscale_04.png">png</a>, <a class="reference external" href="../users/plotting/colormaps/grayscale_04.hires.png">hires.png</a>, <a class="reference external" href="../users/plotting/colormaps/grayscale_04.pdf">pdf</a>)</p>
254+
</div>
208255
</div>
209256
<div class="section" id="color-vision-deficiencies">
210257
<h2>Color vision deficiencies<a class="headerlink" href="#color-vision-deficiencies" title="Permalink to this headline"></a></h2>
@@ -291,7 +338,7 @@ <h2>References<a class="headerlink" href="#references" title="Permalink to this
291338
</div>
292339
<div class="footer">
293340
&copy; Copyright 2002 - 2012 John Hunter, Darren Dale, Eric Firing, Michael Droettboom and the matplotlib development team; 2012 - 2014 The matplotlib development team.
294-
Last updated on Jul 14, 2015.
341+
Last updated on Feb 16, 2015.
295342
Created using <a
296343
href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
297344
</div>

0 commit comments

Comments
 (0)