def _plot_connectivity_circle_onpick(event, fig=None, axes=None, indices=None, n_nodes=0, node_angles=None, ylim=[9, 10]):
 if (event.inaxes != axes):
  return
 if (event.button == 1):
  if (not (ylim[0] <= event.ydata <= ylim[1])):
   return
  node_angles = (node_angles % (np.pi * 2))
  node = np.argmin(np.abs((event.xdata - node_angles)))
  patches = event.inaxes.patches
  for (ii, (x, y)) in enumerate(zip(indices[0], indices[1])):
   patches[ii].set_visible((node in [x, y]))
  fig.canvas.draw()
 elif (event.button == 3):
  patches = event.inaxes.patches
  for ii in range(np.size(indices, axis=1)):
   patches[ii].set_visible(True)
  fig.canvas.draw()

def _plot_connectivity_circle_onpick ( event , fig = None , axes = None , indices = None , n_nodes = 0 , node_angles = None , ylim = [ 9 , 10 ] ) : if ( event . inaxes != axes ) : return if ( event . button == 1 ) : if ( not ( ylim [ 0 ] <= event . ydata <= ylim [ 1 ] ) ) : return node_angles = ( node_angles % ( np . pi * 2 ) ) node = np . argmin ( np . abs ( ( event . xdata - node_angles ) ) ) patches = event . inaxes . patches for ( ii , ( x , y ) ) in enumerate ( zip ( indices [ 0 ] , indices [ 1 ] ) ) : patches [ ii ] . set_visible ( ( node in [ x , y ] ) ) fig . canvas . draw ( ) elif ( event . button == 3 ) : patches = event . inaxes . patches for ii in range ( np . size ( indices , axis = 1 ) ) : patches [ ii ] . set_visible ( True ) fig . canvas . draw ( )
isolate connections around a single node when user left clicks a node .