@@ -2285,42 +2285,47 @@ def add_collection3d(self, col, zs=0, zdir='z'):
2285
2285
2286
2286
def scatter (self , xs , ys , zs = 0 , zdir = 'z' , s = 20 , c = None , depthshade = True ,
2287
2287
* args , ** kwargs ):
2288
- '''
2288
+ """
2289
2289
Create a scatter plot.
2290
2290
2291
- ============ ========================================================
2292
- Argument Description
2293
- ============ ========================================================
2294
- *xs*, *ys* Positions of data points.
2295
- *zs* Either an array of the same length as *xs* and
2296
- *ys* or a single value to place all points in
2297
- the same plane. Default is 0.
2298
- *zdir* Which direction to use as z ('x', 'y' or 'z')
2299
- when plotting a 2D set.
2300
- *s* Size in points^2. It is a scalar or an array of the
2301
- same length as *x* and *y*.
2302
-
2303
- *c* A color. *c* can be a single color format string, or a
2304
- sequence of color specifications of length *N*, or a
2305
- sequence of *N* numbers to be mapped to colors using the
2306
- *cmap* and *norm* specified via kwargs (see below). Note
2307
- that *c* should not be a single numeric RGB or RGBA
2308
- sequence because that is indistinguishable from an array
2309
- of values to be colormapped. *c* can be a 2-D array in
2310
- which the rows are RGB or RGBA, however, including the
2311
- case of a single row to specify the same color for
2312
- all points.
2313
-
2314
- *depthshade*
2315
- Whether or not to shade the scatter markers to give
2316
- the appearance of depth. Default is *True*.
2317
- ============ ========================================================
2318
-
2319
- Keyword arguments are passed on to
2320
- :func:`~matplotlib.axes.Axes.scatter`.
2291
+ Parameters
2292
+ ----------
2293
+ xs, ys : array-like
2294
+ The data positions.
2295
+ zs : float or array-like, optional, default: 0
2296
+ The z-positions. Either an array of the same length as *xs* and
2297
+ *ys* or a single value to place all points in the same plane.
2298
+ zdir : {'x', 'y', 'z', '-x', '-y', '-z'}, optional, default: 'z'
2299
+ The axis direction for the *zs*. This is useful when plotting 2D
2300
+ data on a 3D Axes. The data must be passed as *xs*, *ys*. Setting
2301
+ *zdir* to 'y' then plots the data to the x-z-plane.
2302
+
2303
+ See also :doc:`/gallery/mplot3d/2dcollections3d`.
2304
+
2305
+ s : scalar or array-like, optional, default: 20
2306
+ The marker size in points**2. Either an array of the same length
2307
+ as *xs* and *ys* or a single value to make all markers the same
2308
+ size.
2309
+ c : color, sequence, or sequence of color, optional
2310
+ The marker color. Possible values:
2311
+
2312
+ - A single color format string.
2313
+ - A sequence of color specifications of length n.
2314
+ - A sequence of n numbers to be mapped to colors using *cmap* and
2315
+ *norm*.
2316
+ - A 2-D array in which the rows are RGB or RGBA.
2317
+
2318
+ For more details see the *c* argument of `~.axes.Axes.scatter`.
2319
+ depthshade : bool, optional, default: True
2320
+ Whether to shade the scatter markers to give the appearance of
2321
+ depth.
2322
+ **kwargs
2323
+ All other arguments are passed on to `~.axes.Axes.scatter`.
2321
2324
2322
- Returns a :class:`~mpl_toolkits.mplot3d.art3d.Patch3DCollection`
2323
- '''
2325
+ Returns
2326
+ -------
2327
+ paths : `~matplotlib.collections.PathCollection`
2328
+ """
2324
2329
2325
2330
had_data = self .has_data ()
2326
2331
0 commit comments