MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / _set_unmasked_verts

Method _set_unmasked_verts

lib/matplotlib/collections.py:2656–2673  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2654 return ~mask
2655
2656 def _set_unmasked_verts(self):
2657 X = self._coordinates[..., 0]
2658 Y = self._coordinates[..., 1]
2659
2660 unmask = self._get_unmasked_polys()
2661 X1 = np.ma.filled(X[:-1, :-1])[unmask]
2662 Y1 = np.ma.filled(Y[:-1, :-1])[unmask]
2663 X2 = np.ma.filled(X[1:, :-1])[unmask]
2664 Y2 = np.ma.filled(Y[1:, :-1])[unmask]
2665 X3 = np.ma.filled(X[1:, 1:])[unmask]
2666 Y3 = np.ma.filled(Y[1:, 1:])[unmask]
2667 X4 = np.ma.filled(X[:-1, 1:])[unmask]
2668 Y4 = np.ma.filled(Y[:-1, 1:])[unmask]
2669 npoly = len(X1)
2670
2671 xy = np.ma.stack([X1, Y1, X2, Y2, X3, Y3, X4, Y4, X1, Y1], axis=-1)
2672 verts = xy.reshape((npoly, 5, 2))
2673 self.set_verts(verts)
2674
2675 def get_edgecolor(self):
2676 # docstring inherited

Callers 2

__init__Method · 0.95
set_arrayMethod · 0.95

Calls 2

_get_unmasked_polysMethod · 0.95
set_vertsMethod · 0.45

Tested by

no test coverage detected