x = np.linspace(0, 2 * np.pi, 100)
pl.plot(x, np.sin(x), '-x', label='sin')
pl.plot(x, np.random.standard_normal(len(x)), 'o', label='rand')
leg = pl.legend(numpoints=3)
l = leg.legendHandles[1]
l._legmarker.set_xdata(l._legmarker.get_xdata()[1:2])
l._legmarker.set_ydata(l._legmarker.get_ydata()[1:2])
pl.show()
Matplotlib legend: how to assign multiple scatterpoints values