def _toggle_labels(label, params):
 if (label == 'Channel names visible'):
  params['settings'][0] = (not params['settings'][0])
  labels = params['ax'].yaxis.get_ticklabels()
  for label in labels:
   label.set_visible(params['settings'][0])
 elif (label == 'Event-id visible'):
  params['settings'][1] = (not params['settings'][1])
  labels = params['ax2'].xaxis.get_ticklabels()
  for label in labels:
   label.set_visible(params['settings'][1])
 elif (label == 'Epoch-id visible'):
  params['settings'][2] = (not params['settings'][2])
  labels = params['ax'].xaxis.get_ticklabels()
  for label in labels:
   label.set_visible(params['settings'][2])
 elif (label == 'Zeroline visible'):
  params['settings'][3] = (not params['settings'][3])
  _plot_vert_lines(params)
 params['fig'].canvas.draw()
 if (params['fig_proj'] is not None):
  params['fig_proj'].canvas.draw()

def _toggle_labels ( label , params ) : if ( label == 'Channel names visible' ) : params [ 'settings' ] [ 0 ] = ( not params [ 'settings' ] [ 0 ] ) labels = params [ 'ax' ] . yaxis . get_ticklabels ( ) for label in labels : label . set_visible ( params [ 'settings' ] [ 0 ] ) elif ( label == 'Event-id visible' ) : params [ 'settings' ] [ 1 ] = ( not params [ 'settings' ] [ 1 ] ) labels = params [ 'ax2' ] . xaxis . get_ticklabels ( ) for label in labels : label . set_visible ( params [ 'settings' ] [ 1 ] ) elif ( label == 'Epoch-id visible' ) : params [ 'settings' ] [ 2 ] = ( not params [ 'settings' ] [ 2 ] ) labels = params [ 'ax' ] . xaxis . get_ticklabels ( ) for label in labels : label . set_visible ( params [ 'settings' ] [ 2 ] ) elif ( label == 'Zeroline visible' ) : params [ 'settings' ] [ 3 ] = ( not params [ 'settings' ] [ 3 ] ) _plot_vert_lines ( params ) params [ 'fig' ] . canvas . draw ( ) if ( params [ 'fig_proj' ] is not None ) : params [ 'fig_proj' ] . canvas . draw ( )
toggle axis labels .