def _prepare_projectors(params):
 import matplotlib.pyplot as plt
 import matplotlib as mpl
 epochs = params['epochs']
 projs = params['projs']
 if ((len(projs) > 0) and (not epochs.proj)):
  ax_button = plt.subplot2grid((10, 15), (9, 14))
  opt_button = mpl.widgets.Button(ax_button, 'Proj')
  callback_option = partial(_toggle_options, params=params)
  opt_button.on_clicked(callback_option)
  params['opt_button'] = opt_button
  params['ax_button'] = ax_button
 params['plot_update_proj_callback'] = _plot_update_epochs_proj
 callback_proj = partial(_toggle_proj, params=params)
 params['callback_proj'] = callback_proj
 callback_proj('none')

def _prepare_projectors ( params ) : import matplotlib . pyplot as plt import matplotlib as mpl epochs = params [ 'epochs' ] projs = params [ 'projs' ] if ( ( len ( projs ) > 0 ) and ( not epochs . proj ) ) : ax_button = plt . subplot2grid ( ( 10 , 15 ) , ( 9 , 14 ) ) opt_button = mpl . widgets . Button ( ax_button , 'Proj' ) callback_option = partial ( _toggle_options , params = params ) opt_button . on_clicked ( callback_option ) params [ 'opt_button' ] = opt_button params [ 'ax_button' ] = ax_button params [ 'plot_update_proj_callback' ] = _plot_update_epochs_proj callback_proj = partial ( _toggle_proj , params = params ) params [ 'callback_proj' ] = callback_proj callback_proj ( 'none' )
set up the projectors for epochs browser .