Skip to content

Commit

Permalink
FIX plot.TopoButterfly: nudging topo-time
Browse files Browse the repository at this point in the history
  • Loading branch information
christianbrodbeck committed Jan 23, 2017
1 parent dd93b54 commit 1923608
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions eelbrain/plot/_topo.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,8 @@ class TopoButterfly(TopoMapKey, YLimMixin, XAxisMixin, EelFigure):
- LMB click in a butterfly plot fixates the topomap time
- RMB click in a butterfly plot removes the time point, the topomaps
follow the mouse pointer
- ``,``: Decrement the current topomap time (go left)
- ``.``: Increment the current topomap time (got right)
- ``,``: Decrement the current topomap time (go left)
- ``t``: open a ``Topomap`` plot for the time point under the mouse
pointer
- ``T``: open a larger ``Topomap`` plot with visible sensor names for the
Expand Down Expand Up @@ -308,8 +308,8 @@ def __init__(self, epochs, Xax=None, xlabel=True, ylabel=True,
XAxisMixin.__init__(self, epochs, xdim, xlim, self.bfly_axes)
YLimMixin.__init__(self, self.bfly_plots + self.topo_plots)
self.canvas.mpl_connect('button_press_event', self._on_click)
self._register_key(',', self._on_arrow)
self._register_key('.', self._on_arrow)
self._register_key('.', self._on_nudge_topo_t)
self._register_key(',', self._on_nudge_topo_t)
TopoMapKey.__init__(self, self._topo_data)
self._realtime_topo = True
self._t_label = None # time label under lowest topo-map
Expand Down Expand Up @@ -390,9 +390,9 @@ def _topo_data(self, event):

return seg, "%i ms" % round(t * 1e3), self._topo_kwargs['proj']

def _on_arrow(self, event):
i = digitize(self._current_t, self._xvalues, event.key == 'left')
if event.key == 'left' and i > 0:
def _on_nudge_topo_t(self, event):
i = digitize(self._current_t, self._xvalues, event.key == ',')
if event.key == ',' and i > 0:
i -= 1
elif i == len(self._xvalues):
i -= 1
Expand Down

0 comments on commit 1923608

Please sign in to comment.