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

Function poly_collection_2d_to_3d

lib/mpl_toolkits/mplot3d/art3d.py:1555–1575  ·  view source on GitHub ↗

Convert a `.PolyCollection` into a `.Poly3DCollection` object. Parameters ---------- col : `~matplotlib.collections.PolyCollection` The collection to convert. zs : float or array of floats The location or locations to place the polygons in the collection along

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

Source from the content-addressed store, hash-verified

1553
1554
1555def poly_collection_2d_to_3d(col, zs=0, zdir='z', axlim_clip=False):
1556 """
1557 Convert a `.PolyCollection` into a `.Poly3DCollection` object.
1558
1559 Parameters
1560 ----------
1561 col : `~matplotlib.collections.PolyCollection`
1562 The collection to convert.
1563 zs : float or array of floats
1564 The location or locations to place the polygons in the collection along
1565 the *zdir* axis. Default: 0.
1566 zdir : {'x', 'y', 'z'}
1567 The axis in which to place the patches. Default: 'z'.
1568 See `.get_dir_vector` for a description of the values.
1569 """
1570 segments_3d, codes = _paths_to_3d_segments_with_codes(
1571 col.get_paths(), zs, zdir)
1572 col.__class__ = Poly3DCollection
1573 col.set_verts_and_codes(segments_3d, codes)
1574 col.set_3d_properties()
1575 col._axlim_clip = axlim_clip
1576
1577
1578def juggle_axes(xs, ys, zs, zdir):

Callers

nothing calls this directly

Calls 4

get_pathsMethod · 0.45
set_verts_and_codesMethod · 0.45
set_3d_propertiesMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…