Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 29a3707 commit 8f2ab7aCopy full SHA for 8f2ab7a
examples/mplot3d/voxels.py
@@ -20,16 +20,16 @@
20
link = abs(x - y) + abs(y - z) + abs(z - x) <= 2
21
22
# combine the objects into a single boolean array
23
-voxels = cube1 | cube2 | link
+voxelarray = cube1 | cube2 | link
24
25
# set the colors of each object
26
-colors = np.empty(voxels.shape, dtype=object)
+colors = np.empty(voxelarray.shape, dtype=object)
27
colors[link] = 'red'
28
colors[cube1] = 'blue'
29
colors[cube2] = 'green'
30
31
# and plot everything
32
ax = plt.figure().add_subplot(projection='3d')
33
-ax.voxels(voxels, facecolors=colors, edgecolor='k')
+ax.voxels(voxelarray, facecolors=colors, edgecolor='k')
34
35
plt.show()
0 commit comments