|
From: robert r. <ro...@re...> - 2011-07-20 18:49:19
|
hi there,
I would like to draw a a set of lines on top of an image.
Somehow I do not get the result I want
these are the points ((267, 140), (380, 773), (267, 958))
one of my divers atempts is:
pic = plt.imread('../hlwd/effizienz_balken_01.jpg')
pic = np.fliplr(np.rot90(pic, k=2))
plt.imshow(pic)
frame1 = plt.gca()
lx = []
ly = []
for pt in ((267, 140), (380, 773), (267, 958)):
lx.append(pt[0])
ly.append(pt[1])
x,y = np.array([lx, ly])
line = mlines.Line2D(x, y, lw=5., alpha=0.4)
frame1.add_line(line)
plt.show()
which produces on line instad of two.
thanks for any pointers
robert
|