<html><body>
<p>1 new commit in yt:</p>
<p><a href="https://bitbucket.org/yt_analysis/yt/commits/b446990d1ee3/">https://bitbucket.org/yt_analysis/yt/commits/b446990d1ee3/</a> Changeset:   b446990d1ee3 Branch:      yt User:        ngoldbaum Date:        2016-04-06 18:12:19+00:00 Summary:     Merged in migueldvb/yt (pull request #2099)</p>
<p>Minor changes in colormap docs Affected #:  1 file</p>
<p>diff -r b7e33fa51d6a6bc39a40180c775dad0788a7b4d2 -r b446990d1ee3cf51fe5860b07ee5fea3e27b70da doc/source/visualizing/colormaps/index.rst --- a/doc/source/visualizing/colormaps/index.rst +++ b/doc/source/visualizing/colormaps/index.rst @@ -3,33 +3,33 @@</p>
<pre>Colormaps
=========
</pre>
<p>-There are several colormaps available for yt.  yt includes all of the -matplotlib colormaps as well for nearly all functions.  Individual -visualization functions usually allow you to specify a colormap with the +There are several colormaps available for yt.  yt includes all of the +matplotlib colormaps as well for nearly all functions.  Individual +visualization functions usually allow you to specify a colormap with the</p>
<pre>``cmap`` flag.

.. _install-palettable:
</pre>
<p>-Palettable and ColorBrewer2 +Palettable and ColorBrewer2</p>
<pre>~~~~~~~~~~~~~~~~~~~~~~~~~~~

While colormaps that employ a variety of colors often look attractive,
they are not always the best choice to convey information to one's audience.</pre>
<p>-There are numerous `articles <<a href="https://eagereyes.org/basics/rainbow-color-map">https://eagereyes.org/basics/rainbow-color-map</a>>`_ -and -`presentations <<a href="http://pong.tamu.edu/~kthyng/presentations/visualization.pdf">http://pong.tamu.edu/~kthyng/presentations/visualization.pdf</a>>`_ -that discuss how rainbow-based colormaps fail with regard to black-and-white +There are numerous `articles <<a href="https://eagereyes.org/basics/rainbow-color-map">https://eagereyes.org/basics/rainbow-color-map</a>>`_ +and +`presentations <<a href="http://pong.tamu.edu/~kthyng/presentations/visualization.pdf">http://pong.tamu.edu/~kthyng/presentations/visualization.pdf</a>>`_ +that discuss how rainbow-based colormaps fail with regard to black-and-white</p>
<pre>reproductions, colorblind audience members, and confusing in color ordering.
Depending on the application, the consensus seems to be that gradients between
one or two colors are the best way for the audience to extract information
from one's figures.  Many such colormaps are found in palettable.
</pre>
<p>-If you have installed `palettable <<a href="http://jiffyclub.github.io/palettable/">http://jiffyclub.github.io/palettable/</a>>`_ -(formerly brewer2mpl), you can also access the discrete colormaps available +If you have installed `palettable <<a href="http://jiffyclub.github.io/palettable/">http://jiffyclub.github.io/palettable/</a>>`_ +(formerly brewer2mpl), you can also access the discrete colormaps available</p>
<pre>to that package including those from `colorbrewer <http://colorbrewer2.org>`_.</pre>
<p>-Install `palettable <<a href="http://jiffyclub.github.io/palettable/">http://jiffyclub.github.io/palettable/</a>>`_ with -``pip install palettable``.  To access these maps in yt, instead of supplying -the colormap name, specify a tuple of the form (name, type, number), for +Install `palettable <<a href="http://jiffyclub.github.io/palettable/">http://jiffyclub.github.io/palettable/</a>>`_ with +``pip install palettable``.  To access these maps in yt, instead of supplying +the colormap name, specify a tuple of the form (name, type, number), for</p>
<pre>example ``('RdBu', 'Diverging', 9)``.  These discrete colormaps will
not be interpolated, and can be useful for creating
colorblind/printer/grayscale-friendly plots. For more information, visit</pre>
<p>@@ -40,22 +40,22 @@</p>
<pre>Making and Viewing Custom Colormaps
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</pre>
<p>-yt can also accommodate custom colormaps using the -:func:`~yt.visualization.color_maps.make_colormap` function -These custom colormaps can be made to an arbitrary level of -complexity.  You can make these on the fly for each yt session, or you can -store them in your :ref:`plugin-file` for access to them in every future yt +yt can also accommodate custom colormaps using the +:func:`~yt.visualization.color_maps.make_colormap` function +These custom colormaps can be made to an arbitrary level of +complexity.  You can make these on the fly for each yt session, or you can +store them in your :ref:`plugin-file` for access to them in every future yt</p>
<pre>session.  The example below creates two custom colormaps, one that has</pre>
<p>-three equally spaced bars of blue, white and red, and the other that -interpolates in increasing lengthen intervals from black to red, to green, -to blue.  These will be accessible for the rest of the yt session as -'french_flag' and ‘weird’.  See -:func:`~yt.visualization.color_maps.make_colormap` and +three equally spaced bars of blue, white and red, and the other that +interpolates in increasing lengthed intervals from black to red, to green, +to blue.  These will be accessible for the rest of the yt session as +'french_flag' and ‘weird’.  See +:func:`~yt.visualization.color_maps.make_colormap` and</p>
<pre>:func:`~yt.visualization.color_maps.show_colormaps` for more details.

.. code-block:: python
</pre>
<ul><li><p>yt.make_colormap([('blue', 20), ('white', 20), ('red', 20)],</p></li></ul>
<p>+    yt.make_colormap([('blue', 20), ('white', 20), ('red', 20)],</p>
<pre>name='french_flag', interpolate=False)
     yt.make_colormap([('black', 5), ('red', 10), ('green', 20), ('blue', 0)],
name='weird', interpolate=True)</pre>
<p>@@ -66,7 +66,7 @@</p>
<pre>This is a chart of all of the yt and matplotlib colormaps available.  In
addition to each colormap displayed here, you can access its "reverse" by simply</pre>
<p>-appending a ``"_r"`` to the end of the colormap name. +appending a ``"_r"`` to the end of the colormap name.</p>
<pre>.. image:: ../_images/all_colormaps.png
   :width: 512</pre>
<p>@@ -80,7 +80,7 @@</p>
<pre>Displaying Colormaps Locally
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</pre>
<p>-To display the most up to date colormaps locally, you can use the +To display the most up to date colormaps locally, you can use the</p>
<pre>:func:`~yt.visualization.color_maps.show_colormaps` function.  By default,
you'll see every colormap available to you, but you can specify subsets
of colormaps to display, either as just the ``yt_native`` colormaps, or</pre>
<p>@@ -98,7 +98,7 @@</p>
<pre>import yt
yt.show_colormaps(subset=['algae', 'kamae', 'spectral',</pre>
<ul><li><p>‘arbre’, ‘dusk’, ‘octarine’, 'kelp'],</p></li></ul>
<p>+                              ‘arbre’, ‘dusk’, ‘octarine’, 'kelp'],</p>
<pre>                      filename="yt_native.png")

Applying a Colormap to your Rendering</pre>
<p>@@ -111,7 +111,7 @@</p>
<pre>    yt.write_image(im, "output.png", cmap_name = 'jet')
</pre>
<p>-If you're using the Plot Window interface (e.g. SlicePlot, ProjectionPlot, +If you're using the Plot Window interface (e.g. SlicePlot, ProjectionPlot,</p>
<pre>etc.), it's even easier than that.  Simply create your rendering, and you
can quickly swap the colormap on the fly after the fact with the ``set_cmap``
callback:</pre>
<p>@@ -127,16 +127,16 @@</p>
<pre>    p.set_cmap(field="density", cmap='hot')
    p.save('proj_with_hot_cmap.png')
</pre>
<p>-For more information about the callbacks available to Plot Window objects, +For more information about the callbacks available to Plot Window objects,</p>
<pre>see :ref:`callbacks`.

Examples of Each Colormap
~~~~~~~~~~~~~~~~~~~~~~~~~

To give the reader a better feel for how a colormap appears once it is applied</pre>
<p>-to a dataset, below we provide a library of identical projections of an -isolated galaxy where only the colormap has changed.  They use the sample -dataset “IsolatedGalaxy” available at +to a dataset, below we provide a library of identical projections of an +isolated galaxy where only the colormap has changed.  They use the sample +dataset “IsolatedGalaxy” available at</p>
<pre>`http://yt-project.org/data <http://yt-project.org/data>`_.

.. yt_colormaps:: cmap_images.py</pre>
<p>Repository URL: <a href="https://bitbucket.org/yt_analysis/yt/">https://bitbucket.org/yt_analysis/yt/</a></p>
<p>—</p>
<p>This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.</p>

<img src="http://link.bitbucket.org/wf/open?upn=ll4ctv0L-2ByeRZFC1LslHcg6aJmnQ70VruLbmeLQr27BeEaBEFtpaOj6LDvejbSvLdoafmXAmJcU0D2PfKdcHRcmilPi-2BtiE4Zt38vlQb2K42zJUL8u1jzky1gjxTPfJhwLgVyIZnFAMRtpowBd6MTBq51zjO-2F-2FgFbjUlXe-2BmHpctCpj61y91HJCC7WxhjjFm7x9G7UjX-2BdIaFed6B6UPgW3lNV5fhi0zfLukUIMT8Xw-3D" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;"/>
</body></html>