@@ -2903,9 +2903,13 @@ def add_collection3d(self, col, zs=0, zdir='z', autolim=True, *,
2903
2903
@_preprocess_data (replace_names = ["xs" , "ys" , "zs" , "s" ,
2904
2904
"edgecolors" , "c" , "facecolor" ,
2905
2905
"facecolors" , "color" ])
2906
- def scatter (self , xs , ys ,
2907
- zs = 0 , zdir = 'z' , s = 20 , c = None , depthshade = True , * args ,
2908
- axlim_clip = False , ** kwargs ):
2906
+ def scatter (self , xs , ys , zs = 0 , zdir = 'z' , s = 20 , c = None , depthshade = True ,
2907
+ depthshade_inverted = False ,
2908
+ depthshade_minalpha = 0.3 ,
2909
+ depthshade_legacy = False ,
2910
+ * args ,
2911
+ axlim_clip = False ,
2912
+ ** kwargs ):
2909
2913
"""
2910
2914
Create a scatter plot.
2911
2915
@@ -2941,12 +2945,24 @@ def scatter(self, xs, ys,
2941
2945
Whether to shade the scatter markers to give the appearance of
2942
2946
depth. Each call to ``scatter()`` will perform its depthshading
2943
2947
independently.
2948
+
2949
+ depthshade_inverted : bool, default: False
2950
+ Whether to reverse the order of depth-shading transparency.
2951
+
2952
+ depthshade_minalpha : float, default: 0.3
2953
+ The lowest alpha value applied by depth-shading.
2954
+
2955
+ depthshade_legacy : bool, default: False
2956
+ Whether to use the legacy algorithm for depth-shading.
2957
+
2944
2958
axlim_clip : bool, default: False
2945
2959
Whether to hide the scatter points outside the axes view limits.
2946
2960
2947
2961
.. versionadded:: 3.10
2962
+
2948
2963
data : indexable object, optional
2949
2964
DATA_PARAMETER_PLACEHOLDER
2965
+
2950
2966
**kwargs
2951
2967
All other keyword arguments are passed on to `~.axes.Axes.scatter`.
2952
2968
@@ -2972,9 +2988,16 @@ def scatter(self, xs, ys,
2972
2988
zs = zs .copy ()
2973
2989
2974
2990
patches = super ().scatter (xs , ys , s = s , c = c , * args , ** kwargs )
2975
- art3d .patch_collection_2d_to_3d (patches , zs = zs , zdir = zdir ,
2976
- depthshade = depthshade ,
2977
- axlim_clip = axlim_clip )
2991
+ art3d .patch_collection_2d_to_3d (
2992
+ patches ,
2993
+ zs = zs ,
2994
+ zdir = zdir ,
2995
+ depthshade = depthshade ,
2996
+ depthshade_inverted = depthshade_inverted ,
2997
+ depthshade_minalpha = depthshade_minalpha ,
2998
+ depthshade_legacy = depthshade_legacy ,
2999
+ axlim_clip = axlim_clip ,
3000
+ )
2978
3001
2979
3002
if self ._zmargin < 0.05 and xs .size > 0 :
2980
3003
self .set_zmargin (0.05 )
0 commit comments