def _epochs_navigation_onclick(event, params):
 import matplotlib.pyplot as plt
 p = params
 here = None
 if (event.inaxes == p['back'].ax):
  here = 1
 elif (event.inaxes == p['next'].ax):
  here = (-1)
 elif (event.inaxes == p['reject-quit'].ax):
  if p['reject_idx']:
   p['epochs'].drop(p['reject_idx'])
  plt.close(p['fig'])
  plt.close(event.inaxes.get_figure())
 if (here is not None):
  p['idx_handler'].rotate(here)
  p['axes_handler'].rotate(here)
  this_idx = p['idx_handler'][0]
  _draw_epochs_axes(this_idx, p['good_ch_idx'], p['bad_ch_idx'], p['data'][this_idx], p['times'], p['axes'], p['title_str'], p['axes_handler'])
  p['axes'][0].get_figure().canvas.draw()

def _epochs_navigation_onclick ( event , params ) : import matplotlib . pyplot as plt p = params here = None if ( event . inaxes == p [ 'back' ] . ax ) : here = 1 elif ( event . inaxes == p [ 'next' ] . ax ) : here = ( - 1 ) elif ( event . inaxes == p [ 'reject-quit' ] . ax ) : if p [ 'reject_idx' ] : p [ 'epochs' ] . drop ( p [ 'reject_idx' ] ) plt . close ( p [ 'fig' ] ) plt . close ( event . inaxes . get_figure ( ) ) if ( here is not None ) : p [ 'idx_handler' ] . rotate ( here ) p [ 'axes_handler' ] . rotate ( here ) this_idx = p [ 'idx_handler' ] [ 0 ] _draw_epochs_axes ( this_idx , p [ 'good_ch_idx' ] , p [ 'bad_ch_idx' ] , p [ 'data' ] [ this_idx ] , p [ 'times' ] , p [ 'axes' ] , p [ 'title_str' ] , p [ 'axes_handler' ] ) p [ 'axes' ] [ 0 ] . get_figure ( ) . canvas . draw ( )
handle epochs navigation click .