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

Function _path_to_3d_segment_with_codes

lib/mpl_toolkits/mplot3d/art3d.py:420–432  ·  view source on GitHub ↗

Convert a path to a 3D segment with path codes.

(path, zs=0, zdir='z')

Source from the content-addressed store, hash-verified

418
419
420def _path_to_3d_segment_with_codes(path, zs=0, zdir='z'):
421 """Convert a path to a 3D segment with path codes."""
422
423 zs = np.broadcast_to(zs, len(path))
424 pathsegs = path.iter_segments(simplify=False, curves=False)
425 seg_codes = [((x, y, z), code) for ((x, y), code), z in zip(pathsegs, zs)]
426 if seg_codes:
427 seg, codes = zip(*seg_codes)
428 seg3d = [juggle_axes(x, y, z, zdir) for (x, y, z) in seg]
429 else:
430 seg3d = []
431 codes = []
432 return seg3d, list(codes)
433
434
435def _paths_to_3d_segments_with_codes(paths, zs=0, zdir='z'):

Callers 1

Calls 2

juggle_axesFunction · 0.85
iter_segmentsMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…