Hi, The legend of an axes instance is stored in axes.legend_ attribute. And your second legend call will simply rebind this attribute to the new legend object, and the first one is never drawn. You may make a custom Axes class which can hold multiple legends. But if you want something quick,
first_legend = pt.legend(crv_lst,labels1,loc='upper right',shadow=True) pt.legend(crv_lst,labels2,loc='upper left',shadow=True) gca().add_artist(first_legend) draw() It works for my quick test. -JJ On Wed, Aug 20, 2008 at 6:17 AM, Yves Revaz <[EMAIL PROTECTED]> wrote: > Hi, > > How is it possible to add two legends in the same plot ? > > Of course, if I try : > pt.legend(crv_lst,labels1,loc='upper right',shadow=True) > pt.legend(crv_lst,labels2,loc='upper left',shadow=True) > > the first one is erased by the second one... :-( > > Thanks in advance, > > yves > > > > -- > (o o) > --------------------------------------------oOO--(_)--OOo------- > Yves Revaz > Laboratory of Astrophysics EPFL > Observatoire de Sauverny Tel : ++ 41 22 379 24 28 > 51. Ch. des Maillettes Fax : ++ 41 22 379 22 05 > 1290 Sauverny e-mail : [EMAIL PROTECTED] > SWITZERLAND Web : http://www.lunix.ch/revaz/ > ---------------------------------------------------------------- > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users