mpl_toolkits.mplot3d.art3d.Patch3DCollection

class mpl_toolkits.mplot3d.art3d.Patch3DCollection(*args, zs=0, zdir='z', depthshade=True, **kwargs)[source]

Bases: matplotlib.collections.PatchCollection

A collection of 3D patches.

Create a collection of flat 3D patches with its normal vector pointed in zdir direction, and located at zs on the zdir axis. 'zs' can be a scalar or an array-like of the same length as the number of patches in the collection.

Constructor arguments are the same as for PatchCollection. In addition, keywords zs=0 and zdir='z' are available.

Also, the keyword argument depthshade is available to indicate whether or not to shade the patches in order to give the appearance of depth (default is True). This is typically desired in scatter plots.

__init__(*args, zs=0, zdir='z', depthshade=True, **kwargs)[source]

Create a collection of flat 3D patches with its normal vector pointed in zdir direction, and located at zs on the zdir axis. 'zs' can be a scalar or an array-like of the same length as the number of patches in the collection.

Constructor arguments are the same as for PatchCollection. In addition, keywords zs=0 and zdir='z' are available.

Also, the keyword argument depthshade is available to indicate whether or not to shade the patches in order to give the appearance of depth (default is True). This is typically desired in scatter plots.

__module__ = 'mpl_toolkits.mplot3d.art3d'
do_3d_projection(renderer=<deprecated parameter>)[source]
get_depthshade()[source]
set_3d_properties(zs, zdir)[source]
set_depthshade(depthshade)[source]

Set whether depth shading is performed on collection members.

Parameters:
depthshadebool

Whether to shade the patches in order to give the appearance of depth.

set_edgecolor(c)[source]

Set the edgecolor(s) of the collection.

Parameters:
ccolor or list of colors or 'face'

The collection edgecolor(s). If a sequence, the patches cycle through it. If 'face', match the facecolor.

set_facecolor(c)[source]

Set the facecolor(s) of the collection. c can be a color (all patches have same color), or a sequence of colors; if it is a sequence the patches will cycle through the sequence.

If c is 'none', the patch will not be filled.

Parameters:
ccolor or list of colors
set_sort_zpos(val)[source]

Set the position to use for z-sorting.

Examples using mpl_toolkits.mplot3d.art3d.Patch3DCollection