def _onpick_sensor(event, fig, ax, pos, ch_names, show_names):
 if ((event.mouseevent.key == 'control') and (fig.lasso is not None)):
  for ind in event.ind:
   fig.lasso.select_one(ind)
  return
 if show_names:
  return
 ind = event.ind[0]
 ch_name = ch_names[ind]
 this_pos = pos[ind]
 ax.texts.pop(0)
 if (len(this_pos) == 3):
  ax.text(this_pos[0], this_pos[1], this_pos[2], ch_name)
 else:
  ax.text(this_pos[0], this_pos[1], ch_name)
 fig.canvas.draw()

def _onpick_sensor ( event , fig , ax , pos , ch_names , show_names ) : if ( ( event . mouseevent . key == 'control' ) and ( fig . lasso is not None ) ) : for ind in event . ind : fig . lasso . select_one ( ind ) return if show_names : return ind = event . ind [ 0 ] ch_name = ch_names [ ind ] this_pos = pos [ ind ] ax . texts . pop ( 0 ) if ( len ( this_pos ) == 3 ) : ax . text ( this_pos [ 0 ] , this_pos [ 1 ] , this_pos [ 2 ] , ch_name ) else : ax . text ( this_pos [ 0 ] , this_pos [ 1 ] , ch_name ) fig . canvas . draw ( )
callback for picked channel in plot_sensors .