我有不同类别的数据点需要进行可视化。这是我得到的图像:http://imgur.com/1x97h
共有10个类别,每个类别有300个数据点,总共有3000个数据点。它们被连接在一个单一的数组
有人知道为什么我的图例出了问题吗?
d
中,我会遍历它的块。标签在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()
有人知道为什么我的图例出了问题吗?