[yt-svn] commit/yt-doc: 5 new changesets

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Fri Sep 6 16:15:46 PDT 2013


5 new commits in yt-doc:

https://bitbucket.org/yt_analysis/yt-doc/commits/d480e5d2381f/
Changeset:   d480e5d2381f
User:        chummels
Date:        2013-09-07 00:43:34
Summary:     Adding a short blurb on how to apply colormaps to different functions in yt as suggested by elizabeth tasker.
Affected #:  1 file

diff -r d0ccdc8417b5b80ca2bcc8eaacd4ad9080749d22 -r d480e5d2381fff4eb1637ef386e8aab9abc9da8d source/visualizing/colormaps/index.rst
--- a/source/visualizing/colormaps/index.rst
+++ b/source/visualizing/colormaps/index.rst
@@ -44,6 +44,31 @@
     from yt.mods import *
     show_colormaps(subset = "yt_native", filename = "yt_native.png")
 
+Applying a Colormap to your Rendering
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+All of the visualization functions in yt have a keyword allowing you to
+manually specify a specific colormap.  For example:
+
+.. code-block:: python
+
+    write_image(im, "output.png", cmap_name = 'jet')
+
+If you're using the Plot Window interface (e.g. SlicePlot, ProjectionPlot, 
+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 a callback:
+
+.. code-block:: python
+
+    pf = load("IsolatedGalaxy/galaxy0030/galaxy0030")
+    p = ProjectionPlot(pf, "z", "Density")
+
+    p.set_cmap(field="Density", cmap='jet')
+    p.save('proj_with_jet_cmap.png')
+
+    p.set_cmap(field="Density", cmap='hot')
+    p.save('proj_with_hot_cmap.png')
+
 Examples of Each Colormap
 ~~~~~~~~~~~~~~~~~~~~~~~~~
 


https://bitbucket.org/yt_analysis/yt-doc/commits/50511b84b39f/
Changeset:   50511b84b39f
User:        chummels
Date:        2013-09-07 01:04:33
Summary:     Adding in references to callbacks elsewhere in docs.
Affected #:  1 file

diff -r d480e5d2381fff4eb1637ef386e8aab9abc9da8d -r 50511b84b39f9ba42fc118ce060d2418703c7ac1 source/visualizing/colormaps/index.rst
--- a/source/visualizing/colormaps/index.rst
+++ b/source/visualizing/colormaps/index.rst
@@ -56,7 +56,8 @@
 
 If you're using the Plot Window interface (e.g. SlicePlot, ProjectionPlot, 
 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 a callback:
+can quickly swap the colormap on the fly after the fact with the ``set_cmap``
+callback:
 
 .. code-block:: python
 
@@ -69,6 +70,9 @@
     p.set_cmap(field="Density", cmap='hot')
     p.save('proj_with_hot_cmap.png')
 
+For more information about the callbacks available to Plot Window objects, 
+see :ref:`callbacks`.
+
 Examples of Each Colormap
 ~~~~~~~~~~~~~~~~~~~~~~~~~
 


https://bitbucket.org/yt_analysis/yt-doc/commits/bb8ade05a038/
Changeset:   bb8ade05a038
User:        chummels
Date:        2013-09-07 01:07:41
Summary:     Adding title to the dynamically generated colormap plots.
Affected #:  1 file

diff -r 50511b84b39f9ba42fc118ce060d2418703c7ac1 -r bb8ade05a0381c6d72f06397d6d8798beb17559a source/visualizing/colormaps/cmap_images.py
--- a/source/visualizing/colormaps/cmap_images.py
+++ b/source/visualizing/colormaps/cmap_images.py
@@ -11,4 +11,5 @@
     if cmap.startswith("idl"):
         continue
     p.set_cmap(field="Density", cmap=cmap)
+    p.annotate_title(cmap)
     p.save('Projection_%s.png' % cmap)


https://bitbucket.org/yt_analysis/yt-doc/commits/1c55707caca2/
Changeset:   1c55707caca2
User:        chummels
Date:        2013-09-07 01:11:23
Summary:     Fixing a bug to make sure colormap page links to the full size images correctly.
Affected #:  1 file

diff -r bb8ade05a0381c6d72f06397d6d8798beb17559a -r 1c55707caca2c3dc4532176c96e4d09f02d52ec4 extensions/yt_colormaps.py
--- a/extensions/yt_colormaps.py
+++ b/extensions/yt_colormaps.py
@@ -45,7 +45,7 @@
             im_name = os.path.join("_static", os.path.basename(im))
             lines.append(".. image:: %s" % im_name)
             lines.append("   :width: 400")
-            lines.append("   :target: _static/%s" % os.path.basename(im))
+            lines.append("   :target: ../../_images/%s" % os.path.basename(im))
             lines.append("\n")
         lines.append("\n")
         self.state_machine.insert_input(lines, rst_file)


https://bitbucket.org/yt_analysis/yt-doc/commits/f72cc6ba11c6/
Changeset:   f72cc6ba11c6
User:        chummels
Date:        2013-09-07 01:13:32
Summary:     Merging.
Affected #:  1 file

diff -r 1c55707caca2c3dc4532176c96e4d09f02d52ec4 -r f72cc6ba11c61433bf0f751624d3dfba5c9dba20 source/visualizing/colormaps/cmap_images.py
--- a/source/visualizing/colormaps/cmap_images.py
+++ b/source/visualizing/colormaps/cmap_images.py
@@ -12,4 +12,4 @@
         continue
     p.set_cmap(field="Density", cmap=cmap)
     p.annotate_title(cmap)
-    p.save('Projection_%s.png' % cmap)
+    p.save('Projection_%s.png' % cmap.replace(' ', '_'))

Repository URL: https://bitbucket.org/yt_analysis/yt-doc/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.



More information about the yt-svn mailing list