I have a set of unstructured (x,y) points which I would like to
compute a boundary polygon for.  I don't want the convex hull.

I was able to use matplotlib.tri to get a Delaunay triangulation for
my points by following the examples online, but I'm having trouble
masking everything but the triangles with a boundary edge.
Additionally, once I get this, I'm not clear on how to plot just the
boundary.

Here is what it seems like the mask should be, assume triang comes
from matplotlib.tri.Triangulation().

mask = np.where(np.where(triang.neighbors < 0, 0, 1).all(axis=1), 1, 0)
triang.set_mask(mask)

but, when I plot triang using plot.triplot(), or plt.plot() to plot
the edges, I am getting a bunch of extra stuff that isn't just the
boundary triangles/edges.

Anybody have example code for properly masking and plotting only the
boundary edges?

~Luke

-- 
"Those who would give up essential liberty to purchase a little
temporary safety deserve neither liberty nor safety."

-- Benjamin Franklin, Historical Review of Pennsylvania, 1759

------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to