[yt-svn] commit/yt: MatthewTurk: Merged in xarthisius/yt (pull request #1205)

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Tue Sep 16 04:15:47 PDT 2014


1 new commit in yt:

https://bitbucket.org/yt_analysis/yt/commits/d57edec9dcd8/
Changeset:   d57edec9dcd8
Branch:      yt
User:        MatthewTurk
Date:        2014-09-16 13:15:35
Summary:     Merged in xarthisius/yt (pull request #1205)

[doc] 'annotate_field' in annotate_halos is a string
Affected #:  2 files

diff -r 458e5abdc91df80eb88c0016eddb93dbe0883931 -r d57edec9dcd80913a6610dc84e6d1c1ac6b0b710 doc/source/visualizing/_cb_docstrings.inc
--- a/doc/source/visualizing/_cb_docstrings.inc
+++ b/doc/source/visualizing/_cb_docstrings.inc
@@ -152,7 +152,7 @@
 ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 .. function:: annotate_halos(self, halo_catalog, circle_kwargs=None, width=None, \ 
-                             annotate_field=False, font_kwargs=None, factor=1.0):
+                             annotate_field=None, font_kwargs=None, factor=1.0):
 
    (This is a proxy for
    :class:`~yt.visualization.plot_modifications.HaloCatalogCallback`.)
@@ -166,12 +166,12 @@
    the circles can be changed with the circle_kwargs dictionary, which is 
    supplied to the Matplotlib patch Circle.  One can label each of the halos 
    with the annotate_field, which accepts a field contained in the halo catalog 
-   to add text to the plot near the halo (example: annotate_field = 
-   ``particle_mass`` will write the halo mass next to each halo, whereas 
-   ``particle_identifier`` shows the halo number).  font_kwargs contains the 
+   to add text to the plot near the halo (example: ``annotate_field=
+   'particle_mass'`` will write the halo mass next to each halo, whereas 
+   ``'particle_identifier'`` shows the halo number).  font_kwargs contains the 
    arguments controlling the text appearance of the annotated field.
    Factor is the number the virial radius is multiplied by for plotting the 
-   circles. Ex: factor = 2.0 will plot circles with twice the radius of each 
+   circles. Ex: ``factor=2.0`` will plot circles with twice the radius of each 
    halo virial radius.
 
 .. python-script::
@@ -186,7 +186,7 @@
    hc.create()
 
    prj = yt.ProjectionPlot(data_ds, 'z', 'density')
-   prj.annotate_halos(hc, annotate_field=particle_identifier)
+   prj.annotate_halos(hc, annotate_field='particle_identifier')
    prj.save()
 
 Overplot a Straight Line

diff -r 458e5abdc91df80eb88c0016eddb93dbe0883931 -r d57edec9dcd80913a6610dc84e6d1c1ac6b0b710 yt/visualization/plot_modifications.py
--- a/yt/visualization/plot_modifications.py
+++ b/yt/visualization/plot_modifications.py
@@ -901,7 +901,7 @@
 class HaloCatalogCallback(PlotCallback):
     """
     annotate_halos(halo_catalog, circle_kwargs=None,
-        width = None, annotate_field = False,
+        width=None, annotate_field=None,
         font_kwargs=None, factor = 1.0)
 
     Plots circles at the locations of all the halos
@@ -930,7 +930,7 @@
     _descriptor = None
 
     def __init__(self, halo_catalog, circle_kwargs=None, 
-            width = None, annotate_field = False,
+            width=None, annotate_field=None,
             font_kwargs=None, factor = 1.0):
 
         PlotCallback.__init__(self)

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

--

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