I frequently find myself wanting to draw a bunch of disconnected line
segments or polygons.
Is there anything in matplotlib to facilitate that? I usually just end up
writing a loop.
Like:
for s,e in izip(starts,ends):
plot([s[0],e[0]], [s[1],e[1]], 'b-')
Or if the starts and ends are interleaved, something like
for i in enumerate(segs[::2])
plot(segs[i:i+2,0], segs[i:i+2,1], 'b-')
For a set of polys it's much the same just i:i+N instead of i:i+2.
--bb
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users