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