[Yt-svn] yt-commit r712 - branches/yt-1.0/examples

mturk at wrangler.dreamhost.com mturk at wrangler.dreamhost.com
Thu Jul 31 10:33:06 PDT 2008


Author: mturk
Date: Thu Jul 31 10:33:05 2008
New Revision: 712
URL: http://yt.spacepope.org/changeset/712

Log:
Added examples for plotting profiles.



Added:
   branches/yt-1.0/examples/cookbook_plotting_1dprofiles.py
   branches/yt-1.0/examples/cookbook_plotting_2dprofiles.py

Added: branches/yt-1.0/examples/cookbook_plotting_1dprofiles.py
==============================================================================
--- (empty file)
+++ branches/yt-1.0/examples/cookbook_plotting_1dprofiles.py	Thu Jul 31 10:33:05 2008
@@ -0,0 +1,12 @@
+from yt.mods import *
+pf = get_pf()
+
+pc = PlotCollection(pf)
+
+pc.add_profile_sphere(10.0, 'kpc', ["Density", "Temperature"])
+
+my_sphere = pf.h.sphere([0.5,0.5,0.5], 100.0/pf['kpc'])
+extracted = my_sphere.extract_region(my_sphere["x-velocity"] > 1e5)
+pc.add_profile_object(extracted, ["Density", "Temperature"])
+
+pc.save("diagrams")

Added: branches/yt-1.0/examples/cookbook_plotting_2dprofiles.py
==============================================================================
--- (empty file)
+++ branches/yt-1.0/examples/cookbook_plotting_2dprofiles.py	Thu Jul 31 10:33:05 2008
@@ -0,0 +1,13 @@
+from yt.mods import *
+pf = get_pf()
+
+pc = PlotCollection(pf)
+
+pc.add_phase_sphere(10.0, 'kpc', ["Density", "Temperature", "VelocityMagnitude"])
+
+my_sphere = pf.h.sphere([0.5,0.5,0.5], 100.0/pf['kpc'])
+extracted = my_sphere.extract_region(my_sphere["x-velocity"] > 1e5)
+pc.add_phase_object(extracted, ["Density", "Temperature", "CellMassMsun"],
+                    weight=None)
+
+pc.save("diagrams")



More information about the yt-svn mailing list