In the code on:
I think I've figured out that:
vertices = (np.random.random((4, 2))-0.5)*6.0
vertices = np.ma.masked_array(vertices, [[False, False], [True, True], [False, False], [False, False]])
prevents the second of four random vertices from being used. But I'm not sure why
plot(vertices[:, 0], vertices[:, 1], color=color)
seems to connect only two points for a line segment.
Can someone explain?