Skip to content

Flip left and right in plot_map. #318

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions nipy/labs/viz_tools/slicers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand All @@ -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',
Expand All @@ -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',
Expand Down