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

[Matplotlib-users] Slow drawing of many lines in Basemap

2008-08-20 Thread Zane Selvans
I'm drawing several hundred lines at a time, each consisting of 10-100 points, and it takes a couple of minutes for them all to display, which makes me think I must be doing something stupid. The function that does the drawing looks like this: def plotlinmap(lins, map=None): if map is No

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

Re: [Matplotlib-users] minorLocator

2008-08-20 Thread Yves Revaz
Yves Revaz wrote: > Hi all, > > How is it possible to display by default the minor ticks with an > interval 5 times > smaller than the major ticks. > > I can do that for a known range of data : for example : > > ax = pt.gca() > ax.xaxis.set_major_locator(MultipleLocator(10)) > ax.xaxis.set_minor_lo

[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 --