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

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Thu Sep 26 10:51:06 PDT 2013


2 new commits in yt-doc:

https://bitbucket.org/yt_analysis/yt-doc/commits/3b314733db6e/
Changeset:   3b314733db6e
User:        ngoldbaum
Date:        2013-09-23 06:06:04
Summary:     Adding new multipanel and plot window cookbook recipes.
Affected #:  6 files

diff -r 14a04e122f42b7fafea40e393d0d008d9e7ec459 -r 3b314733db6e71e0031858f8048b91e8376625d5 source/cookbook/complex_plots.rst
--- a/source/cookbook/complex_plots.rst
+++ b/source/cookbook/complex_plots.rst
@@ -49,6 +49,21 @@
 
 .. _cookbook-offaxis_projection:
 
+Multipanel with Axes Labels
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+This illustrates how to use a SlicePlot to control a multipanel plot.  This
+plot uses axes labels to illustrate the length scales in the plot.
+
+.. yt_cookbook:: multi_plot_2x2.py
+
+Time Series Multipanel
+~~~~~~~~~~~~~~~~~~~~~~
+
+This illustrates how to create a multipanel plot of a time series dataset.
+
+.. yt_cookbook:: multi_plot_2x2_time_series.py
+
 Projecting Off-Axis
 ~~~~~~~~~~~~~~~~~~~
 

diff -r 14a04e122f42b7fafea40e393d0d008d9e7ec459 -r 3b314733db6e71e0031858f8048b91e8376625d5 source/cookbook/multi_plot_2x2_time_series.py
--- /dev/null
+++ b/source/cookbook/multi_plot_2x2_time_series.py
@@ -0,0 +1,29 @@
+from yt.mods import *
+import matplotlib.pyplot as plt
+from mpl_toolkits.axes_grid1 import AxesGrid
+
+fns = ['Enzo_64/DD0005/data0005','Enzo_64/DD0015/data0015', 'Enzo_64/DD0025/data0025', 'Enzo_64/DD0035/data0035']
+
+fig = plt.figure()
+grid = AxesGrid(fig, (0.1,0.1,0.9,0.9),
+                nrows_ncols = (2, 2),
+                axes_pad = 0.1,
+                label_mode = "L",
+                share_all = True,
+                cbar_location="right",
+                cbar_mode="single",
+                cbar_size="5%",
+                cbar_pad="0%")
+
+for i, fn in enumerate(fns):
+    pf = load(fn) # load data
+    p = ProjectionPlot(pf, 'z', 'Density', width=(55, 'Mpccm'))
+    p.set_zlim('Density', 1e-4, 1e-2)
+    p.set_font({'size':12})
+    plot = p.plots['Density']
+    plot.figure = fig
+    plot.axes = grid[i].axes
+    plot.cax = grid.cbar_axes[i]
+    p._setup_plots()
+
+plt.savefig('multiplot_2x2_time_series.png')

diff -r 14a04e122f42b7fafea40e393d0d008d9e7ec459 -r 3b314733db6e71e0031858f8048b91e8376625d5 source/cookbook/multiplot_2x2.py
--- /dev/null
+++ b/source/cookbook/multiplot_2x2.py
@@ -0,0 +1,31 @@
+from yt.mods import *
+import matplotlib.pyplot as plt
+from mpl_toolkits.axes_grid1 import AxesGrid
+
+fn = "IsolatedGalaxy/galaxy0030/galaxy0030"
+pf = load(fn) # load data
+
+fig = plt.figure()
+grid = AxesGrid(fig, (0.075,0.075,0.85,0.85),
+                nrows_ncols = (2, 2),
+                axes_pad = 1.0,
+                label_mode = "1",
+                share_all = True,
+                cbar_location="right",
+                cbar_mode="each",
+                cbar_size="3%",
+                cbar_pad="0%")
+
+fields = ['Density', 'x-velocity', 'y-velocity', 'VelocityMagnitude']
+
+p = SlicePlot(pf, 'z', fields)
+p.zoom(2)
+
+for i, field in enumerate(fields):
+    plot = p.plots[field]
+    plot.figure = fig
+    plot.axes = grid[i].axes
+    plot.cax = grid.cbar_axes[i]
+
+p._setup_plots()
+plt.savefig('multiplot_2x2.png')

diff -r 14a04e122f42b7fafea40e393d0d008d9e7ec459 -r 3b314733db6e71e0031858f8048b91e8376625d5 source/cookbook/multiplot_2x2_time_series.py
--- /dev/null
+++ b/source/cookbook/multiplot_2x2_time_series.py
@@ -0,0 +1,28 @@
+from yt.mods import *
+import matplotlib.pyplot as plt
+from mpl_toolkits.axes_grid1 import AxesGrid
+
+fns = ['Enzo_64/DD0005/data0005','Enzo_64/DD0015/data0015', 'Enzo_64/DD0025/data0025', 'Enzo_64/DD0035/data0035']
+
+fig = plt.figure()
+grid = AxesGrid(fig, (0.075,0.075,0.85,0.85),
+                nrows_ncols = (2, 2),
+                axes_pad = 0.05,
+                label_mode = "L",
+                share_all = True,
+                cbar_location="right",
+                cbar_mode="single",
+                cbar_size="3%",
+                cbar_pad="0%")
+
+for i, fn in enumerate(fns):
+    pf = load(fn) # load data
+    p = ProjectionPlot(pf, 'z', 'Density', width=(55, 'Mpccm'))
+    p.set_zlim('Density', 1e-4, 1e-2)
+    plot = p.plots['Density']
+    plot.figure = fig
+    plot.axes = grid[i].axes
+    plot.cax = grid.cbar_axes[i]
+    p._setup_plots()
+
+plt.savefig('multiplot_2x2_time_series.png')

diff -r 14a04e122f42b7fafea40e393d0d008d9e7ec459 -r 3b314733db6e71e0031858f8048b91e8376625d5 source/cookbook/show_hide_axes_colorbar.py
--- /dev/null
+++ b/source/cookbook/show_hide_axes_colorbar.py
@@ -0,0 +1,19 @@
+from yt.mods import *
+
+pf = load("IsolatedGalaxy/galaxy0030/galaxy0030")
+
+slc = SlicePlot(pf, "x", "Density")
+
+slc.save("default_sliceplot.png")
+
+slc.plots["Density"].hide_axes()
+
+slc.save("no_axes_sliceplot.png")
+
+slc.plots["Density"].hide_colorbar()
+
+slc.save("no_axes_no_colorbar_sliceplot.png")
+
+slc.plots["Density"].show_axes()
+
+slc.save("no_colorbar_sliceplot.png")

diff -r 14a04e122f42b7fafea40e393d0d008d9e7ec459 -r 3b314733db6e71e0031858f8048b91e8376625d5 source/cookbook/simple_plots.rst
--- a/source/cookbook/simple_plots.rst
+++ b/source/cookbook/simple_plots.rst
@@ -77,6 +77,15 @@
 
 .. yt_cookbook:: simple_slice_with_multiple_fields.py 
 
+Showing and Hiding Axes Labels and Colorbars
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+This example illustrates how to create a SlicePlot and then suppress the axes
+labels and colorbars.  This is useful when you don't care about the physical
+scales and just want to take a closer look at the raw plot data.
+
+.. yt_cookbook:: show_hide_axes_colorbar.py
+
 Accessing and Modifying Plots Directly
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 


https://bitbucket.org/yt_analysis/yt-doc/commits/d8ffc03386be/
Changeset:   d8ffc03386be
User:        ngoldbaum
Date:        2013-09-23 19:14:24
Summary:     Removing a duplicate recipe and fixing the .rst file that pointed to it.
Affected #:  2 files

diff -r 3b314733db6e71e0031858f8048b91e8376625d5 -r d8ffc03386be9b5ca6e388229481343bbbd1333b source/cookbook/complex_plots.rst
--- a/source/cookbook/complex_plots.rst
+++ b/source/cookbook/complex_plots.rst
@@ -55,14 +55,14 @@
 This illustrates how to use a SlicePlot to control a multipanel plot.  This
 plot uses axes labels to illustrate the length scales in the plot.
 
-.. yt_cookbook:: multi_plot_2x2.py
+.. yt_cookbook:: multiplot_2x2.py
 
 Time Series Multipanel
 ~~~~~~~~~~~~~~~~~~~~~~
 
 This illustrates how to create a multipanel plot of a time series dataset.
 
-.. yt_cookbook:: multi_plot_2x2_time_series.py
+.. yt_cookbook:: multiplot_2x2_time_series.py
 
 Projecting Off-Axis
 ~~~~~~~~~~~~~~~~~~~

diff -r 3b314733db6e71e0031858f8048b91e8376625d5 -r d8ffc03386be9b5ca6e388229481343bbbd1333b source/cookbook/multi_plot_2x2_time_series.py
--- a/source/cookbook/multi_plot_2x2_time_series.py
+++ /dev/null
@@ -1,29 +0,0 @@
-from yt.mods import *
-import matplotlib.pyplot as plt
-from mpl_toolkits.axes_grid1 import AxesGrid
-
-fns = ['Enzo_64/DD0005/data0005','Enzo_64/DD0015/data0015', 'Enzo_64/DD0025/data0025', 'Enzo_64/DD0035/data0035']
-
-fig = plt.figure()
-grid = AxesGrid(fig, (0.1,0.1,0.9,0.9),
-                nrows_ncols = (2, 2),
-                axes_pad = 0.1,
-                label_mode = "L",
-                share_all = True,
-                cbar_location="right",
-                cbar_mode="single",
-                cbar_size="5%",
-                cbar_pad="0%")
-
-for i, fn in enumerate(fns):
-    pf = load(fn) # load data
-    p = ProjectionPlot(pf, 'z', 'Density', width=(55, 'Mpccm'))
-    p.set_zlim('Density', 1e-4, 1e-2)
-    p.set_font({'size':12})
-    plot = p.plots['Density']
-    plot.figure = fig
-    plot.axes = grid[i].axes
-    plot.cax = grid.cbar_axes[i]
-    p._setup_plots()
-
-plt.savefig('multiplot_2x2_time_series.png')

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