Re: [Matplotlib-users] two legends

2008-08-20 Thread Benoit Donnet
Hi, Here is a piece of code I recently used for plotting 2 different legends. This is not the most sexy code in the world but it works. #axis and legend axis([-0.1, 3.1, 0, 1], font) xlabel(r'\textrm{relative error}', font) ylabel(r'\textrm{cdf}', font) rc('legend', numpoints=1) leg1 = figleg

Re: [Matplotlib-users] two legends

2008-08-20 Thread Jae-Joon Lee
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, fir

[Matplotlib-users] two legends

2008-08-20 Thread Yves Revaz
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 --