mpl_toolkits.mplot3d.art3d.Patch3DCollection#
- classmpl_toolkits.mplot3d.art3d.Patch3DCollection(*args,zs=0,zdir='z',depthshade=None,depthshade_minalpha=None,axlim_clip=False,**kwargs)[source]#
Bases:
PatchCollectionA collection of 3D patches.
Create a collection of flat 3D patches with its normal vectorpointed inzdir direction, and located atzs on thezdiraxis. 'zs' can be a scalar or an array-like of the same length asthe number of patches in the collection.
Constructor arguments are the same as for
PatchCollection. In addition,keywordszs=0 andzdir='z' are available.The keyword argumentdepthshade is available toindicate whether or not to shade the patches in order togive the appearance of depth (default isTrue).This is typically desired in scatter plots.
depthshade_minalpha sets the minimum alpha value applied bydepth-shading.
- set(*,agg_filter=<UNSET>,alpha=<UNSET>,animated=<UNSET>,antialiased=<UNSET>,array=<UNSET>,capstyle=<UNSET>,clim=<UNSET>,clip_box=<UNSET>,clip_on=<UNSET>,clip_path=<UNSET>,cmap=<UNSET>,color=<UNSET>,depthshade=<UNSET>,edgecolor=<UNSET>,facecolor=<UNSET>,gid=<UNSET>,hatch=<UNSET>,hatch_linewidth=<UNSET>,hatchcolor=<UNSET>,in_layout=<UNSET>,joinstyle=<UNSET>,label=<UNSET>,linestyle=<UNSET>,linewidth=<UNSET>,mouseover=<UNSET>,norm=<UNSET>,offset_transform=<UNSET>,offsets=<UNSET>,path_effects=<UNSET>,paths=<UNSET>,picker=<UNSET>,pickradius=<UNSET>,rasterized=<UNSET>,sketch_params=<UNSET>,snap=<UNSET>,sort_zpos=<UNSET>,transform=<UNSET>,url=<UNSET>,urls=<UNSET>,visible=<UNSET>,zorder=<UNSET>)[source]#
Set multiple properties at once.
Supported properties are
Property
Description
float or array of floats
a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image
array-like or float or None
bool
bool or list of bools
array-like or None
CapStyleor {'butt', 'projecting', 'round'}(vmin: float, vmax: float)
BboxBaseor Nonebool
Patch or (Path, Transform) or None
Colormapor str or Nonecolor or list of RGBA tuples
bool
edgecolororecoredgecolorsfacecolororfacecolorsorfcstr
{'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}
unknown
bool
JoinStyleor {'miter', 'round', 'bevel'}object
linestyleordashesorlinestylesorlsstr or tuple or list thereof
linewidthorlinewidthsorlwfloat or list of floats
bool
Normalizeor str or None(N, 2) or (2,) array-like
list of
AbstractPathEffectunknown
None or bool or float or callable
float
bool
(scale: float, length: float, randomness: float)
bool or None
unknown
str
list of str or None
bool
float
- set_3d_properties(zs,zdir,axlim_clip=False)[source]#
Set thez positions and direction of the patches.
- Parameters:
- zsfloat or array of floats
The location or locations to place the patches in the collectionalong thezdir axis.
- zdir{'x', 'y', 'z'}
Plane to plot patches orthogonal to.All patches must have the same direction.See
get_dir_vectorfor a description of the values.- axlim_clipbool, default: False
Whether to hide patches with a vertex outside the axes view limits.
Added in version 3.10.
- set_depthshade(depthshade,depthshade_minalpha=None)[source]#
Set whether depth shading is performed on collection members.
- Parameters:
- depthshadebool
Whether to shade the patches in order to give the appearance ofdepth.
- depthshade_minalphafloat, default:
rcParams["axes3d.depthshade_minalpha"](default:0.3) Sets the minimum alpha value used by depth-shading.
Added in version 3.11.