diff --git a/nipy/labs/viz_tools/slicers.py b/nipy/labs/viz_tools/slicers.py index 2b99028b97..416cbf66a8 100644 --- a/nipy/labs/viz_tools/slicers.py +++ b/nipy/labs/viz_tools/slicers.py @@ -137,7 +137,10 @@ def draw_cut(self, cut, data_bounds, bounding_box, raise ValueError('Invalid value for direction %s' % self.direction) ax = self.ax - getattr(ax, type)(cut, extent=(xmin, xmax, zmin, zmax), **kwargs) + if self.direction == 'x': + getattr(ax, type)(cut, extent=(xmin, xmax, zmin, zmax), **kwargs) + else: + getattr(ax, type)(cut, extent=(xmax, xmin, zmin, zmax), **kwargs) self._object_bounds.append((xmin_, xmax_, zmin_, zmax_)) ax.axis(self.get_object_bounds()) @@ -161,7 +164,7 @@ def draw_left_right(self, size, bg_color, **kwargs): if self.direction == 'x': return ax = self.ax - ax.text(.1, .95, 'L', + ax.text(.1, .95, 'R', transform=ax.transAxes, horizontalalignment='left', verticalalignment='top', @@ -170,7 +173,7 @@ def draw_left_right(self, size, bg_color, **kwargs): ec=bg_color, fc=bg_color, alpha=1), **kwargs) - ax.text(.9, .95, 'R', + ax.text(.9, .95, 'L', transform=ax.transAxes, horizontalalignment='right', verticalalignment='top',