@@ -2756,6 +2756,11 @@ def voxels(self, *args, **kwargs):
2756
2756
placed with its lower corner at the origin. Occluded faces are not
2757
2757
plotted.
2758
2758
2759
+ Call signatures::
2760
+
2761
+ voxels(filled, facecolors=fc, edgecolors=ec, **kwargs)
2762
+ voxels(x, y, z, filled, facecolors=fc, edgecolors=ec, **kwargs)
2763
+
2759
2764
.. versionadded:: 2.1
2760
2765
2761
2766
Parameters
@@ -2767,23 +2772,30 @@ def voxels(self, *args, **kwargs):
2767
2772
x, y, z : 3D np.array, optional
2768
2773
The coordinates of the corners of the voxels. This should broadcast
2769
2774
to a shape one larger in every dimension than the shape of `filled`.
2770
- These arguments can be used to plot non-cubic voxels.
2771
- If not specified, defaults to increasing integers along each axis.
2775
+ These can be used to plot non-cubic voxels.
2772
2776
2773
- facecolors, edgecolors : array_like
2774
- The color to draw the faces and edges of the voxels. This parameter
2775
- can be:
2777
+ If not specified, defaults to increasing integers along each axis,
2778
+ like those returned by :func:`~numpy.indices`.
2779
+ As indicated by the ``/`` in the function signature, these arguments
2780
+ can only be passed positionally.
2781
+
2782
+ facecolors, edgecolors : array_like, optional
2783
+ The color to draw the faces and edges of the voxels. Can only be
2784
+ passed as keyword arguments.
2785
+ This parameter can be:
2776
2786
2777
2787
- A single color value, to color all voxels the same color. This
2778
2788
can be either a string, or a 1D rgb/rgba array
2779
- - ``None``, indicating to use the default
2789
+ - ``None``, the default, to use a single color for the faces, and
2790
+ the style default for the edges.
2780
2791
- A 3D ndarray of color names, with each item the color for the
2781
2792
corresponding voxel. The size must match the voxels.
2782
2793
- A 4D ndarray of rgb/rgba data, with the components along the
2783
2794
last axis.
2784
2795
2785
- Any additional keyword arguments are passed onto
2786
- :func:`~mpl_toolkits.mplot3d.art3d.Poly3DCollection`
2796
+ **kwargs
2797
+ Additional keyword arguments to pass onto
2798
+ :func:`~mpl_toolkits.mplot3d.art3d.Poly3DCollection`
2787
2799
2788
2800
Returns
2789
2801
-------
@@ -2796,7 +2808,6 @@ def voxels(self, *args, **kwargs):
2796
2808
2797
2809
Examples
2798
2810
--------
2799
-
2800
2811
.. plot:: gallery/mplot3d/voxels.py
2801
2812
.. plot:: gallery/mplot3d/voxels_rgb.py
2802
2813
.. plot:: gallery/mplot3d/voxels_torus.py
0 commit comments