Re: [matplotlib-devel] Number of points in legend

2008-06-24 Thread Stéfan van der Walt
2008/6/24 John Hunter <[EMAIL PROTECTED]>: > Committed to svn r5654 -- here is the test script:: > > import numpy as np > import matplotlib.pyplot as plt > plt.plot(np.random.rand(10), 'x-', label='first line') > plt.plot(np.random.rand(10), 'o-.', label='second line') > plt.legend(numpoints=1

Re: [matplotlib-devel] Number of points in legend

2008-06-24 Thread John Hunter
On Tue, Jun 24, 2008 at 1:57 AM, Stéfan van der Walt <[EMAIL PROTECTED]> wrote: > Hi all, > > Sorry to bump the thread, but has anyone had a chance to take a look? > > I've re-attached the patch. Thanks for the reminder and sorry for the delay getting back. The problem in the patch was that the "

Re: [matplotlib-devel] Number of points in legend

2008-06-23 Thread Stéfan van der Walt
Hi all, Sorry to bump the thread, but has anyone had a chance to take a look? I've re-attached the patch. Regards Stéfan 2008/6/17 Stéfan van der Walt <[EMAIL PROTECTED]>: > Hi John > > 2008/6/12 John Hunter <[EMAIL PROTECTED]>: >> On Thu, Jun 12, 2008 at 7:56 AM, Stéfan van der Walt <[EMAIL PR

Re: [matplotlib-devel] Number of points in legend

2008-06-17 Thread Stéfan van der Walt
Hi John 2008/6/12 John Hunter <[EMAIL PROTECTED]>: > On Thu, Jun 12, 2008 at 7:56 AM, Stéfan van der Walt <[EMAIL PROTECTED]> > wrote: > >> linestyle 'x' ---> legend ' x ' >> linestyle '-x' ---> legend '---x---' >> >> Has this been considered before? If not, I'll write a patch. > > I think

Re: [matplotlib-devel] Number of points in legend

2008-06-12 Thread John Hunter
On Thu, Jun 12, 2008 at 7:56 AM, Stéfan van der Walt <[EMAIL PROTECTED]> wrote: > linestyle 'x' ---> legend ' x ' > linestyle '-x' ---> legend '---x---' > > Has this been considered before? If not, I'll write a patch. I think this is just something that has been overlooked. The legend code

[matplotlib-devel] Number of points in legend

2008-06-12 Thread Stéfan van der Walt
Hi all, By default, 'legend' uses two points two represent a line. This looks a bit weird when you have only markers (no line), e.g., import matplotlib.pyplot as plt plt.plot([1,2,3], [4,5,6], 'x', label='first line') plt.legend() plt.show() Notice how there are two crosses in the legend. Havi