Skip to content
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

FIX: Add support for hemi=both in _TimeViewer #7253

Merged
merged 2 commits into from
Jan 24, 2020
Merged
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
16 changes: 3 additions & 13 deletions mne/viz/_brain/_timeviewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,9 @@ def __init__(self, brain):

for hemi in self.brain._hemis:
ci = 0 if hemi == 'lh' else 1
# with both, all hemis are on the same view
if self.brain._hemi == 'both':
ci = 0
for ri, view in enumerate(self.brain._views):
self.plotter.subplot(ri, ci)
name = "orientation_" + str(ri) + "_" + str(ci)
Expand Down Expand Up @@ -426,19 +429,6 @@ def set_slider_style(self, slider, show_label=True):
if not show_label:
slider_rep.ShowSliderLabelOff()

# add support for split window
shape = self.plotter.shape
pointa = slider_rep.GetPoint1Coordinate().GetValue()
pointb = slider_rep.GetPoint2Coordinate().GetValue()
pointa = _normalize(pointa, shape)
pointb = _normalize(pointb, shape)
slider_rep.GetPoint1Coordinate().\
SetCoordinateSystemToNormalizedDisplay()
slider_rep.GetPoint1Coordinate().SetValue(pointa[0], pointa[1])
slider_rep.GetPoint2Coordinate().\
SetCoordinateSystemToNormalizedDisplay()
slider_rep.GetPoint2Coordinate().SetValue(pointb[0], pointb[1])


def _set_text_style(text_actor):
if text_actor is not None:
Expand Down