def _plot_raw_onscroll(event, params, len_channels=None):
 if ('fig_selection' in params):
  _change_channel_group(event.step, params)
  return
 if (len_channels is None):
  len_channels = len(params['inds'])
 orig_start = params['ch_start']
 if (event.step < 0):
  params['ch_start'] = min((params['ch_start'] + params['n_channels']), (len_channels - params['n_channels']))
 else:
  params['ch_start'] = max((params['ch_start'] - params['n_channels']), 0)
 if (orig_start != params['ch_start']):
  _channels_changed(params, len_channels)

def _plot_raw_onscroll ( event , params , len_channels = None ) : if ( 'fig_selection' in params ) : _change_channel_group ( event . step , params ) return if ( len_channels is None ) : len_channels = len ( params [ 'inds' ] ) orig_start = params [ 'ch_start' ] if ( event . step < 0 ) : params [ 'ch_start' ] = min ( ( params [ 'ch_start' ] + params [ 'n_channels' ] ) , ( len_channels - params [ 'n_channels' ] ) ) else : params [ 'ch_start' ] = max ( ( params [ 'ch_start' ] - params [ 'n_channels' ] ) , 0 ) if ( orig_start != params [ 'ch_start' ] ) : _channels_changed ( params , len_channels )
interpret scroll events .