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

Method convert_mesh_to_paths

lib/matplotlib/collections.py:2294–2303  ·  view source on GitHub ↗

Convert a given mesh into a sequence of `.Path` objects. This function is primarily of use to implementers of backends that do not directly support meshes.

(tri)

Source from the content-addressed store, hash-verified

2292
2293 @staticmethod
2294 def convert_mesh_to_paths(tri):
2295 """
2296 Convert a given mesh into a sequence of `.Path` objects.
2297
2298 This function is primarily of use to implementers of backends that do
2299 not directly support meshes.
2300 """
2301 triangles = tri.get_masked_triangles()
2302 verts = np.stack((tri.x[triangles], tri.y[triangles]), axis=-1)
2303 return [mpath.Path(x) for x in verts]
2304
2305 @artist.allow_rasterization
2306 def draw(self, renderer):

Callers 1

set_pathsMethod · 0.95

Calls 1

get_masked_trianglesMethod · 0.80

Tested by

no test coverage detected