def _handle_change_selection(event, params):
 radio = params['fig_selection'].radio
 ydata = event.ydata
 labels = [label._text for label in radio.labels]
 offset = 0
 for (idx, label) in enumerate(labels):
  nchans = len(params['selections'][label])
  offset += nchans
  if (ydata < offset):
   _set_radio_button(idx, params)
   return

def _handle_change_selection ( event , params ) : radio = params [ 'fig_selection' ] . radio ydata = event . ydata labels = [ label . _text for label in radio . labels ] offset = 0 for ( idx , label ) in enumerate ( labels ) : nchans = len ( params [ 'selections' ] [ label ] ) offset += nchans if ( ydata < offset ) : _set_radio_button ( idx , params ) return
helper for handling clicks on vertical scrollbar using selections .