mpl_toolkits.mplot3d.axes3d.Axes3D.stem3D#

Axes3D.stem3D(x,y,z,*,linefmt='C0-',markerfmt='C0o',basefmt='C3-',bottom=0,label=None,orientation='z',axlim_clip=False,data=None)[source]#

Create a 3D stem plot.

A stem plot draws lines perpendicular to a baseline, and places markersat the heads. By default, the baseline is defined byx andy, andstems are drawn vertically frombottom toz.

Parameters:
x, y, zarray-like

The positions of the heads of the stems. The stems are drawn alongtheorientation-direction from the baseline atbottom (in theorientation-coordinate) to the heads. By default, thex andypositions are used for the baseline andz for the head position,but this can be changed byorientation.

linefmtstr, default: 'C0-'

A string defining the properties of the vertical lines. Usually,this will be a color or a color and a linestyle:

Character

Line Style

'-'

solid line

'--'

dashed line

'-.'

dash-dot line

':'

dotted line

Note: While it is technically possible to specify valid formatsother than color or color and linestyle (e.g. 'rx' or '-.'), thisis beyond the intention of the method and will most likely notresult in a reasonable plot.

markerfmtstr, default: 'C0o'

A string defining the properties of the markers at the stem heads.

basefmtstr, default: 'C3-'

A format string defining the properties of the baseline.

bottomfloat, default: 0

The position of the baseline, inorientation-coordinates.

labelstr, optional

The label to use for the stems in legends.

orientation{'x', 'y', 'z'}, default: 'z'

The direction along which stems are drawn.

axlim_clipbool, default: False

Whether to hide stems that are outside the axes limits.

Added in version 3.10.

dataindexable object, optional

If given, all parameters also accept a strings, which isinterpreted asdata[s] ifs is a key indata.

Returns:
StemContainer

The container may be treated like a tuple(markerline,stemlines,baseline)

Examples

(Sourcecode,2x.png,png)

(2x.png,png)

(2x.png,png)

On this page