code: def remove_legend(ax=None):
      
      from pylab import gca, draw
      if ax is None:
          ax = gca()
      ax.legend_ = None
      draw()
docs: Remove legend for axes or gca.
  
      See http://osdir.com/ml/python.matplotlib.general/2005-07/msg00285.html