[yt-svn] commit/yt: ngoldbaum: Adding a field_parameters kwarg to OffAxisSlicePlot.
Bitbucket
commits-noreply at bitbucket.org
Sun Jan 13 20:49:54 PST 2013
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/commits/f3da561a2a81/
changeset: f3da561a2a81
branch: yt
user: ngoldbaum
date: 2013-01-14 05:49:23
summary: Adding a field_parameters kwarg to OffAxisSlicePlot.
affected #: 1 file
diff -r 35f426722e7158425fa4afe75f03421662019194 -r f3da561a2a8121ffcdcf44a3a2d0ebb5b1a7d87f yt/visualization/plot_window.py
--- a/yt/visualization/plot_window.py
+++ b/yt/visualization/plot_window.py
@@ -1161,7 +1161,8 @@
_frb_generator = ObliqueFixedResolutionBuffer
def __init__(self, pf, normal, fields, center='c', width=None,
- axes_unit=None, north_vector=None, fontsize=15):
+ axes_unit=None, north_vector=None, fontsize=15,
+ field_parameters=None):
r"""Creates an off axis slice plot from a parameter file
Given a pf object, a normal vector defining a slicing plane, and
@@ -1200,11 +1201,14 @@
set, an arbitrary grid-aligned north-vector is chosen.
fontsize : integer
The size of the fonts for the axis, colorbar, and tick labels.
+ field_parameters : dictionary
+ A dictionary of field parameters than can be accessed by derived fields.
"""
(bounds, center_rot, units) = GetObliqueWindowParameters(normal,center,width,pf)
if axes_unit is None and units != ('1', '1'):
axes_unit = units
- cutting = pf.h.cutting(normal, center, fields=fields, north_vector=north_vector)
+ if field_parameters is None: field_parameters = {}
+ cutting = pf.h.cutting(normal, center, fields=fields, north_vector=north_vector, **field_parameters)
# Hard-coding the origin keyword since the other two options
# aren't well-defined for off-axis data objects
PWViewerMPL.__init__(self,cutting,bounds,origin='center-window',periodic=False,oblique=True)
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