Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 61d1ad2

Browse files
committed
Improve documentation
1 parent 4690576 commit 61d1ad2

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

lib/mpl_toolkits/mplot3d/axes3d.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2749,7 +2749,10 @@ def voxels(self, filled, color=None):
27492749
Plot a set of filled voxels
27502750
27512751
All voxels are plotted as 1x1x1 cubes on the axis, with filled[0,0,0]
2752-
placed with its lower corner at the origin. Occluded faces are not plotted
2752+
placed with its lower corner at the origin. Occluded faces are not
2753+
plotted.
2754+
2755+
.. versionadded:: 2.1
27532756
27542757
Parameters
27552758
----------
@@ -2813,6 +2816,7 @@ def permutation_matrices(n):
28132816
yield mat
28142817
mat = np.roll(mat, 1, axis=0)
28152818

2819+
# iterate over each of the YZ, ZX, and XY orientations
28162820
for permute in permutation_matrices(3):
28172821
# find the set of ranges to iterate over
28182822
pc, qc, rc = permute.T.dot(filled.shape[:3])
@@ -2822,8 +2826,13 @@ def permutation_matrices(n):
28222826

28232827
square_rot = square.dot(permute.T)
28242828

2829+
# iterate within the current plane
28252830
for p in pinds:
28262831
for q in qinds:
2832+
# iterate perpendicularly to the current plane, handling
2833+
# boundaries. We only draw faces between a voxel and an
2834+
# empty space, to avoid drawing internal faces.
2835+
28272836
# draw lower faces
28282837
p0 = permute.dot([p, q, 0])
28292838
i0 = tuple(p0)

0 commit comments

Comments
 (0)