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

Function line_2d_to_3d

lib/mpl_toolkits/mplot3d/art3d.py:375–393  ·  view source on GitHub ↗

Convert a `.Line2D` to a `.Line3D` object. Parameters ---------- zs : float The location along the *zdir* axis in 3D space to position the line. zdir : {'x', 'y', 'z'} Plane to plot line orthogonal to. Default: 'z'. See `.get_dir_vector` for a descriptio

(line, zs=0, zdir='z', axlim_clip=False)

Source from the content-addressed store, hash-verified

373
374
375def line_2d_to_3d(line, zs=0, zdir='z', axlim_clip=False):
376 """
377 Convert a `.Line2D` to a `.Line3D` object.
378
379 Parameters
380 ----------
381 zs : float
382 The location along the *zdir* axis in 3D space to position the line.
383 zdir : {'x', 'y', 'z'}
384 Plane to plot line orthogonal to. Default: 'z'.
385 See `.get_dir_vector` for a description of the values.
386 axlim_clip : bool, default: False
387 Whether to hide lines with an endpoint outside the axes view limits.
388
389 .. versionadded:: 3.10
390 """
391
392 line.__class__ = Line3D
393 line.set_3d_properties(zs, zdir, axlim_clip)
394
395
396def _path_to_3d_segment(path, zs=0, zdir='z'):

Callers

nothing calls this directly

Calls 1

set_3d_propertiesMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…