Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6a3807d

Browse filesBrowse files
committed
Update docstring of Axes3D.scatter
1 parent f4b2b68 commit 6a3807d
Copy full SHA for 6a3807d

File tree

Expand file treeCollapse file tree

1 file changed

+38
-33
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+38
-33
lines changed

‎lib/mpl_toolkits/mplot3d/axes3d.py

Copy file name to clipboardExpand all lines: lib/mpl_toolkits/mplot3d/axes3d.py
+38-33Lines changed: 38 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2285,42 +2285,47 @@ def add_collection3d(self, col, zs=0, zdir='z'):
22852285

22862286
def scatter(self, xs, ys, zs=0, zdir='z', s=20, c=None, depthshade=True,
22872287
*args, **kwargs):
2288-
'''
2288+
"""
22892289
Create a scatter plot.
22902290
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`.
23212324
2322-
Returns a :class:`~mpl_toolkits.mplot3d.art3d.Patch3DCollection`
2323-
'''
2325+
Returns
2326+
-------
2327+
paths : `~matplotlib.collections.PathCollection`
2328+
"""
23242329

23252330
had_data = self.has_data()
23262331

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.