def _setup_cmap(cmap, n_axes=1, norm=False):
 if (cmap == 'interactive'):
  cmap = (('Reds' if norm else 'RdBu_r'), True)
 elif (not isinstance(cmap, tuple)):
  if (cmap is None):
   cmap = ('Reds' if norm else 'RdBu_r')
  cmap = (cmap, (False if (n_axes > 2) else True))
 return cmap

def _setup_cmap ( cmap , n_axes = 1 , norm = False ) : if ( cmap == 'interactive' ) : cmap = ( ( 'Reds' if norm else 'RdBu_r' ) , True ) elif ( not isinstance ( cmap , tuple ) ) : if ( cmap is None ) : cmap = ( 'Reds' if norm else 'RdBu_r' ) cmap = ( cmap , ( False if ( n_axes > 2 ) else True ) ) return cmap
function for setting color map interactivity .