[yt-svn] commit/yt: 3 new changesets

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Fri Dec 8 09:55:38 PST 2017


3 new commits in yt:

https://bitbucket.org/yt_analysis/yt/commits/502e9cb11054/
Changeset:   502e9cb11054
User:        hyschive
Date:        2017-11-02 22:39:49+00:00
Summary:     Add the cookbook of multipanel phaseplot
Affected #:  1 file

diff -r 21be624bbb559f9f6ff0c47251e53397d8804f1b -r 502e9cb11054a3ac0db5a7ed9cce01ab1a86ac11 doc/source/cookbook/multiplot_phaseplot.py
--- /dev/null
+++ b/doc/source/cookbook/multiplot_phaseplot.py
@@ -0,0 +1,45 @@
+import yt
+import matplotlib.pyplot as plt
+from mpl_toolkits.axes_grid1 import AxesGrid
+
+fig = plt.figure()
+
+# See http://matplotlib.org/mpl_toolkits/axes_grid/api/axes_grid_api.html
+grid = AxesGrid(fig, (0.085,0.085,0.83,0.83),
+                nrows_ncols = (1, 2),
+                axes_pad = 0.05,
+                label_mode = "L",
+                share_all = True,
+                cbar_location="right",
+                cbar_mode="single",
+                cbar_size="3%",
+                cbar_pad="0%",
+                aspect=False )
+
+for i, SnapNum in enumerate([10,40]):
+    # Load the data and create a single plot
+    ds = yt.load( "enzo_tiny_cosmology/DD00%2d/DD00%2d" % (SnapNum,SnapNum) )
+    ad = ds.all_data()
+    p  = yt.PhasePlot( ad, "density", "temperature", ["cell_mass",],
+                       weight_field=None )
+
+    # Ensure the axes and colorbar limits match for all plots
+    p.set_xlim( 1.0e-32, 8.0e-26 )
+    p.set_ylim( 1.0e1, 2.0e7 )
+    p.set_zlim( 'cell_mass', 1e42, 1e46 )
+
+    # This forces the ProjectionPlot to redraw itself on the AxesGrid axes.
+    plot = p.plots['cell_mass']
+    plot.figure = fig
+    plot.axes = grid[i].axes
+    if i == 0: plot.cax = grid.cbar_axes[i]
+
+    # Actually redraws the plot.
+    p._setup_plots()
+
+    # Modify the axes properties **after** p._setup_plots() so that they
+    # are not overwritten.
+    plot.axes.xaxis.set_minor_locator(
+        plt.LogLocator(base=10.0, subs=[2.0,5.0,8.0]) )
+
+plt.savefig( 'multiplot_phaseplot.png' )


https://bitbucket.org/yt_analysis/yt/commits/1d150465d1c9/
Changeset:   1d150465d1c9
User:        hyschive
Date:        2017-11-02 22:45:24+00:00
Summary:     Add the new cookbook example to complex_plots.rst
Affected #:  1 file

diff -r 502e9cb11054a3ac0db5a7ed9cce01ab1a86ac11 -r 1d150465d1c951ee79780843832e2531afaf0d12 doc/source/cookbook/complex_plots.rst
--- a/doc/source/cookbook/complex_plots.rst
+++ b/doc/source/cookbook/complex_plots.rst
@@ -26,6 +26,16 @@
 
 .. yt_cookbook:: multiplot_2x2.py
 
+Multipanel with PhasePlot
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+This illustrates how to use PhasePlot in a multipanel plot.
+See :ref:`how-to-make-2d-profiles` and the
+`Matplotlib AxesGrid Object <http://matplotlib.org/mpl_toolkits/axes_grid/api/axes_grid_api.html>`_
+for more information.
+
+.. yt_cookbook:: multiplot_phaseplot.py
+
 Time Series Multipanel
 ~~~~~~~~~~~~~~~~~~~~~~
 


https://bitbucket.org/yt_analysis/yt/commits/7de54e9896cd/
Changeset:   7de54e9896cd
User:        ngoldbaum
Date:        2017-12-08 17:55:15+00:00
Summary:     Merge pull request #1605 from hyschive/multipanel-phaseplot-cookbook

Add the cookbook of multipanel phaseplot
Affected #:  2 files

diff -r e9e81b4fca00670c5e2d5cf91829479e32aa44bb -r 7de54e9896cd1cd89ba5608b74428e3e8dea6bd3 doc/source/cookbook/complex_plots.rst
--- a/doc/source/cookbook/complex_plots.rst
+++ b/doc/source/cookbook/complex_plots.rst
@@ -26,6 +26,16 @@
 
 .. yt_cookbook:: multiplot_2x2.py
 
+Multipanel with PhasePlot
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+This illustrates how to use PhasePlot in a multipanel plot.
+See :ref:`how-to-make-2d-profiles` and the
+`Matplotlib AxesGrid Object <http://matplotlib.org/mpl_toolkits/axes_grid/api/axes_grid_api.html>`_
+for more information.
+
+.. yt_cookbook:: multiplot_phaseplot.py
+
 Time Series Multipanel
 ~~~~~~~~~~~~~~~~~~~~~~
 

diff -r e9e81b4fca00670c5e2d5cf91829479e32aa44bb -r 7de54e9896cd1cd89ba5608b74428e3e8dea6bd3 doc/source/cookbook/multiplot_phaseplot.py
--- /dev/null
+++ b/doc/source/cookbook/multiplot_phaseplot.py
@@ -0,0 +1,45 @@
+import yt
+import matplotlib.pyplot as plt
+from mpl_toolkits.axes_grid1 import AxesGrid
+
+fig = plt.figure()
+
+# See http://matplotlib.org/mpl_toolkits/axes_grid/api/axes_grid_api.html
+grid = AxesGrid(fig, (0.085,0.085,0.83,0.83),
+                nrows_ncols = (1, 2),
+                axes_pad = 0.05,
+                label_mode = "L",
+                share_all = True,
+                cbar_location="right",
+                cbar_mode="single",
+                cbar_size="3%",
+                cbar_pad="0%",
+                aspect=False )
+
+for i, SnapNum in enumerate([10,40]):
+    # Load the data and create a single plot
+    ds = yt.load( "enzo_tiny_cosmology/DD00%2d/DD00%2d" % (SnapNum,SnapNum) )
+    ad = ds.all_data()
+    p  = yt.PhasePlot( ad, "density", "temperature", ["cell_mass",],
+                       weight_field=None )
+
+    # Ensure the axes and colorbar limits match for all plots
+    p.set_xlim( 1.0e-32, 8.0e-26 )
+    p.set_ylim( 1.0e1, 2.0e7 )
+    p.set_zlim( 'cell_mass', 1e42, 1e46 )
+
+    # This forces the ProjectionPlot to redraw itself on the AxesGrid axes.
+    plot = p.plots['cell_mass']
+    plot.figure = fig
+    plot.axes = grid[i].axes
+    if i == 0: plot.cax = grid.cbar_axes[i]
+
+    # Actually redraws the plot.
+    p._setup_plots()
+
+    # Modify the axes properties **after** p._setup_plots() so that they
+    # are not overwritten.
+    plot.axes.xaxis.set_minor_locator(
+        plt.LogLocator(base=10.0, subs=[2.0,5.0,8.0]) )
+
+plt.savefig( 'multiplot_phaseplot.png' )

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