tags:

views:

877

answers:

1

I have datapoints of different classes which I want to visualize. Here is the image that I get: http://imgur.com/1x97h

There are 3000 datapoints of 10 classes, 300 each. They are concatenated in a single array d over whose chunks I iterate. The labels are given in labels.

pylab.clf()
colors = (i + j for j in 'o<.' for i in 'bgrcmyk')
for l, c  in zip(labels, colors):
  start, stop = i * 300, (i + 1) * 300
  pylab.plot(d[0, start:stop], d[1, start:stop], c, label=l)

pylab.legend(loc='lower left')
pylab.show()

Has anyone a clue why my legend is screwed up?

+3  A: 
Jouni K. Seppänen