| [ Web Proxy ] |
| Viewing: https://matplotlib.org/stable/api/_as_gen/../../gallery/misc/../misc/../mplot3d/stem3d_demo.html | [Back] [Original] |
Section Navigation
fill_between with transparencyhisttype settingsplt.subplotsfloating_axes featuresNote
Go to the end to download the full example code.
Demonstration of a stem plot in 3D, which plots vertical lines from a baseline to the z-coordinate and places a marker at the tip.
[stem3d demo]The position of the baseline can be adapted using bottom. The parameters
linefmt, markerfmt, and basefmt control basic format properties of the
plot. However, in contrast to plot not all properties are
configurable via keyword arguments. For more advanced control adapt the line
objects returned by stem.
fig, ax = plt.subplots(subplot_kw=dict(projection='3d'))
markerline, stemlines, baseline = ax.stem(
x, y, z, linefmt='grey', markerfmt='D', bottom=np.pi)
markerline.set_markerfacecolor('none')
plt.show()
[stem3d demo]The orientation of the stems and baseline can be changed using orientation. This determines in which direction the stems are projected from the head points, towards the bottom baseline.
For examples, by setting orientation='x', the stems are projected along
the x-direction, and the baseline is in the yz-plane.
[stem3d demo]Tags: plot-type: 3D plot-type: specialty level: beginner
Total running time of the script: (0 minutes 1.616 seconds)
Copyright 20022012 John Hunter, Darren Dale, Eric Firing, Michael Droettboom and the Matplotlib development team; 20122026 The Matplotlib development team.
Created using Sphinx 9.1.0.
Built from v3.11.2-1-g879ad8ebba.
Built with the PyData Sphinx Theme 0.16.1.
| Web Proxy Viewer | New URL | Original Page |