2012/6/13 Mike Kaufman <mck...@gmail.com>:
> On 6/13/12 3:23 PM, Steven Boada wrote:
>> Whoops, I forgot to change the subject. Sorry list.
>>
>> List,
>>
>> I'm making a scatter plot using a for loop. Here's a simple example..
>>
>> for i in range(10):
>>       x=rand()
>>       y=rand()
>>       scatter(x,y,label='point')
>>
>> legend()
>> show()
>>
>>
>> When you do this, you get a legend entry for every single point. In this
>> case, I get 9 entries in my legend.
>>
>> Is there a way to only get a single entry?

Maybe you can adapt this to your use case:

for i in range(10):
     x=rand()
     y=rand()
     collection = scatter(x,y,label='point')

legend((collection,), ('Label',))
show()

Goyo

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to