Toggling plot legends

Dear ALL,

I am under the impression that this is a very common question, but is
there any way to toggle on/off a legend from a MPL plot?

Thanks in advance!

Best regards,

···

--
Dr. Mauro J. Cavalcanti
Ecoinformatics Studio
P.O. Box 46521, CEP 20551-970
Rio de Janeiro, RJ, BRASIL
E-mail: maurobio@...287...
Web: http://studio.infobio.net
Linux Registered User #473524 * Ubuntu User #22717
"Life is complex. It consists of real and imaginary parts."

Any artist can be "toggled" on and off by setting the visible property

  leg = ax.legend(something)
  leg.set_visible(True|False)

JDH

···

On Tue, Jan 6, 2009 at 7:15 AM, Mauro Cavalcanti <maurobio@...287...> wrote:

Dear ALL,

I am under the impression that this is a very common question, but is
there any way to toggle on/off a legend from a MPL plot?