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

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Wed Sep 7 11:22:34 PDT 2016


1 new commit in yt:

https://bitbucket.org/yt_analysis/yt/commits/3d49fd15b416/
Changeset:   3d49fd15b416
Branch:      yt
User:        ngoldbaum
Date:        2016-09-07 18:22:08+00:00
Summary:     Merged in MatthewTurk/yt (pull request #2364)

Add documentation for profiler helpers.  Closes #1265.
Affected #:  1 file

diff -r bbef88a523bf205db3cd01a936927d3e82a26507 -r 3d49fd15b41660d3c05fdedec035162835d88756 doc/source/analyzing/generating_processed_data.rst
--- a/doc/source/analyzing/generating_processed_data.rst
+++ b/doc/source/analyzing/generating_processed_data.rst
@@ -107,11 +107,10 @@
    import yt
    ds = yt.load("galaxy0030/galaxy0030")
    source = ds.sphere( "c", (10, "kpc"))
-   profile = yt.create_profile(source,
-                               [("gas", "density")],          # the bin field
-                               [("gas", "temperature"),       # profile field
-                                ("gas", "radial_velocity")],  # profile field
-                               weight_field=("gas", "cell_mass"))
+   profile = source.profile([("gas", "density")],          # the bin field
+                            [("gas", "temperature"),       # profile field
+                             ("gas", "radial_velocity")],  # profile field
+                            weight_field=("gas", "cell_mass"))
 
 The binning, weight, and profile data can now be access as:
 
@@ -142,11 +141,10 @@
 
 .. code-block:: python
 
-   profile2d = yt.create_profile(source,
-                                 [("gas", "density"),      # the x bin field
-                                  ("gas", "temperature")], # the y bin field
-                                 [("gas", "cell_mass")],   # the profile field
-                                 weight_field=None)
+   profile2d = source.profile([("gas", "density"),      # the x bin field
+                               ("gas", "temperature")], # the y bin field
+                              [("gas", "cell_mass")],   # the profile field
+                              weight_field=None)
 
 Accessing the x, y, and profile fields work just as with one-dimensional profiles:
 
@@ -161,7 +159,10 @@
 phase plot that shows the distribution of mass in the density-temperature
 plane, with the average temperature overplotted.  The
 :func:`~matplotlib.pyplot.pcolormesh` function can be used to manually plot
-the 2D profile.
+the 2D profile.  If you want to generate a default profile plot, you can simply
+call:::
+
+  profile.plot()
 
 Three-dimensional profiles can be generated and accessed following
 the same procedures.  Additional keyword arguments are available to control

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