@@ -2252,42 +2252,47 @@ def add_collection3d(self, col, zs=0, zdir='z'):
2252
2252
2253
2253
def scatter (self , xs , ys , zs = 0 , zdir = 'z' , s = 20 , c = None , depthshade = True ,
2254
2254
* args , ** kwargs ):
2255
- '''
2255
+ """
2256
2256
Create a scatter plot.
2257
2257
2258
- ============ ========================================================
2259
- Argument Description
2260
- ============ ========================================================
2261
- *xs*, *ys* Positions of data points.
2262
- *zs* Either an array of the same length as *xs* and
2263
- *ys* or a single value to place all points in
2264
- the same plane. Default is 0.
2265
- *zdir* Which direction to use as z ('x', 'y' or 'z')
2266
- when plotting a 2D set.
2267
- *s* Size in points^2. It is a scalar or an array of the
2268
- same length as *x* and *y*.
2269
-
2270
- *c* A color. *c* can be a single color format string, or a
2271
- sequence of color specifications of length *N*, or a
2272
- sequence of *N* numbers to be mapped to colors using the
2273
- *cmap* and *norm* specified via kwargs (see below). Note
2274
- that *c* should not be a single numeric RGB or RGBA
2275
- sequence because that is indistinguishable from an array
2276
- of values to be colormapped. *c* can be a 2-D array in
2277
- which the rows are RGB or RGBA, however, including the
2278
- case of a single row to specify the same color for
2279
- all points.
2280
-
2281
- *depthshade*
2282
- Whether or not to shade the scatter markers to give
2283
- the appearance of depth. Default is *True*.
2284
- ============ ========================================================
2285
-
2286
- Keyword arguments are passed on to
2287
- :func:`~matplotlib.axes.Axes.scatter`.
2258
+ Parameters
2259
+ ----------
2260
+ xs, ys : array-like
2261
+ The data positions.
2262
+ zs : float or array-like, optional, default: 0
2263
+ The z-positions. Either an array of the same length as *xs* and
2264
+ *ys* or a single value to place all points in the same plane.
2265
+ zdir : {'x', 'y', 'z', '-x', '-y', '-z'}, optional, default: 'z'
2266
+ The axis direction for the *zs*. This is useful when plotting 2D
2267
+ data on a 3D Axes. The data must be passed as *xs*, *ys*. Setting
2268
+ *zdir* to 'y' then plots the data to the x-z-plane.
2269
+
2270
+ See also :doc:`/gallery/mplot3d/2dcollections3d`.
2271
+
2272
+ s : scalar or array-like, optional, default: 20
2273
+ The marker size in points**2. Either an array of the same length
2274
+ as *xs* and *ys* or a single value to make all markers the same
2275
+ size.
2276
+ c : color, sequence, or sequence of color, optional
2277
+ The marker color. Possible values:
2278
+
2279
+ - A single color format string.
2280
+ - A sequence of color specifications of length n.
2281
+ - A sequence of n numbers to be mapped to colors using *cmap* and
2282
+ *norm*.
2283
+ - A 2-D array in which the rows are RGB or RGBA.
2284
+
2285
+ For more details see the *c* argument of `~.axes.Axes.scatter`.
2286
+ depthshade : bool, optional, default: True
2287
+ Whether to shade the scatter markers to give the appearance of
2288
+ depth.
2289
+ **kwargs
2290
+ All other arguments are passed on to `~.axes.Axes.scatter`.
2288
2291
2289
- Returns a :class:`~mpl_toolkits.mplot3d.art3d.Patch3DCollection`
2290
- '''
2292
+ Returns
2293
+ -------
2294
+ paths : `~matplotlib.collections.PathCollection`
2295
+ """
2291
2296
2292
2297
had_data = self .has_data ()
2293
2298
0 commit comments