#--------------------------------------Lance Simms, Stanford 2009
#RemoveLegend.py
#
#PURPOSE
#  To remove a legend from the currently selected figure
#
def remove_legend(ax=None):
    """Remove legend for ax or the current axes."""

    from pylab import gca, draw
    if ax is None:
        ax = gca()
    ax.legend_ = None
    draw()

