[Yt-svn] yt-commit r1483 - branches/yt-1.5/yt/raven trunk/yt/raven
mturk at wrangler.dreamhost.com
mturk at wrangler.dreamhost.com
Wed Oct 14 08:30:26 PDT 2009
Author: mturk
Date: Wed Oct 14 08:30:25 2009
New Revision: 1483
URL: http://yt.enzotools.org/changeset/1483
Log:
Committing a fix for setting xlim/ylim on profile plots.
Modified:
branches/yt-1.5/yt/raven/PlotTypes.py
trunk/yt/raven/PlotTypes.py
Modified: branches/yt-1.5/yt/raven/PlotTypes.py
==============================================================================
--- branches/yt-1.5/yt/raven/PlotTypes.py (original)
+++ branches/yt-1.5/yt/raven/PlotTypes.py Wed Oct 14 08:30:25 2009
@@ -75,6 +75,8 @@
datalabel = None
colorbar = None
+ xlim = None
+ ylim = None
def __init__(self, data, fields, figure = None, axes=None, size=(10,8)):
self.data = data
self.fields = fields
@@ -133,13 +135,14 @@
"""
Set the x boundaries of this plot.
"""
- self._axes.set_xlim(xmin, xmax)
+ self.xlim = (xmin,xmax)
def set_ylim(self, ymin, ymax):
"""
Set the y boundaries of this plot.
"""
- self._axes.set_ylim(ymin, ymax)
+ self.ylim = (ymin,ymax)
+
def set_zlim(self, zmin, zmax, dex=None, nticks=None, ticks=None, minmaxtick=False):
"""
@@ -701,6 +704,8 @@
**self.plot_options)
self._autoset_label(self.fields[0], self.set_x_label, 'x')
self._autoset_label(self.fields[1], self.set_y_label, 'y')
+ if self.xlim is not None: self._axes.set_xlim(*self.xlim)
+ if self.ylim is not None: self._axes.set_ylim(*self.ylim)
self._run_callbacks()
def set_log_field(self, val):
Modified: trunk/yt/raven/PlotTypes.py
==============================================================================
--- trunk/yt/raven/PlotTypes.py (original)
+++ trunk/yt/raven/PlotTypes.py Wed Oct 14 08:30:25 2009
@@ -75,6 +75,8 @@
datalabel = None
colorbar = None
+ xlim = None
+ ylim = None
def __init__(self, data, fields, figure = None, axes=None, size=(10,8)):
self.data = data
self.fields = fields
@@ -133,13 +135,14 @@
"""
Set the x boundaries of this plot.
"""
- self._axes.set_xlim(xmin, xmax)
+ self.xlim = (xmin,xmax)
def set_ylim(self, ymin, ymax):
"""
Set the y boundaries of this plot.
"""
- self._axes.set_ylim(ymin, ymax)
+ self.ylim = (ymin,ymax)
+
def set_zlim(self, zmin, zmax, dex=None, nticks=None, ticks=None, minmaxtick=False):
"""
@@ -711,6 +714,8 @@
**self.plot_options)
self._autoset_label(self.fields[0], self.set_x_label, 'x')
self._autoset_label(self.fields[1], self.set_y_label, 'y')
+ if self.xlim is not None: self._axes.set_xlim(*self.xlim)
+ if self.ylim is not None: self._axes.set_ylim(*self.ylim)
self._run_callbacks()
def set_log_field(self, val):
More information about the yt-svn
mailing list