[ Web Proxy ]
URL:
Viewing: https://matplotlib.org/devdocs/api/_as_gen/../../project/../plot_types/3D/bar3d_simple.html [Back]  [Original]

bar3d(x, y, z, dx, dy, dz) — Matplotlib 3.12.0.dev737+g8881fa8c3 documentation
Back to top
Search the docs ...:

bar3d(x, y, z, dx, dy, dz)#

See bar3d.

bar3d simple [bar3d simple]
import matplotlib.pyplot as plt
import numpy as np

plt.style.use('_mpl-gallery')

# Make data
x = [1, 1, 2, 2]
y = [1, 2, 1, 2]
z = [0, 0, 0, 0]
dx = np.ones_like(x)*0.5
dy = np.ones_like(x)*0.5
dz = [2, 3, 1, 4]

# Plot
fig, ax = plt.subplots(subplot_kw={"projection": "3d"})
ax.bar3d(x, y, z, dx, dy, dz)

ax.set(xticklabels=[],
       yticklabels=[],
       zticklabels=[])

plt.show()

Gallery generated by Sphinx-Gallery


Web Proxy Viewer  |  New URL  |  Original Page