def _butterfly_on_button_press(event, params):
 if params['need_draw']:
  event.canvas.draw()
 else:
  idx = np.where([(event.inaxes is ax) for ax in params['axes']])[0]
  if (len(idx) == 1):
   text = params['texts'][idx[0]]
   text.set_alpha(0.0)
   text.set_path_effects([])
   event.canvas.draw()
 params['need_draw'] = False

def _butterfly_on_button_press ( event , params ) : if params [ 'need_draw' ] : event . canvas . draw ( ) else : idx = np . where ( [ ( event . inaxes is ax ) for ax in params [ 'axes' ] ] ) [ 0 ] if ( len ( idx ) == 1 ) : text = params [ 'texts' ] [ idx [ 0 ] ] text . set_alpha ( 0.0 ) text . set_path_effects ( [ ] ) event . canvas . draw ( ) params [ 'need_draw' ] = False
only draw once for picking .