Hi Robert,

robert rottermann, on 2011-07-21 11:25,  wrote:
> who ever migth be interested:
> I achieved my goal in drawing lines trough a set of points using the path 
> modul.
> 
> http://matplotlib.sourceforge.net/users/path_tutorial.html

Unless there were other considerations for getting this plot, it
really didn't have to be this complicated, read on.
 
> On 20.07.2011 20:49, robert rottermann wrote:
> > 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)

The above can be done with just two lines:
x,y = zip(*((267, 140), (380, 773), (267, 958)))
1.plot(x,y)

best,
-- 
Paul Ivanov
314 address only used for lists,  off-list direct email at:
http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7 

Attachment: signature.asc
Description: Digital signature

------------------------------------------------------------------------------
5 Ways to Improve & Secure Unified Communications
Unified Communications promises greater efficiencies for business. UC can 
improve internal communications as well as offer faster, more efficient ways
to interact with customers and streamline customer service. Learn more!
http://www.accelacomm.com/jaw/sfnl/114/51426253/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to