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 90e4a8f

Browse filesBrowse files
authored
Merge pull request #10026 from dstansby/scatter-docstring
Fix scatter docstring markup
2 parents dc38085 + 1422635 commit 90e4a8f
Copy full SHA for 90e4a8f

File tree

Expand file treeCollapse file tree

1 file changed

+26
-25
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+26
-25
lines changed

‎lib/matplotlib/axes/_axes.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axes/_axes.py
+26-25Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3853,20 +3853,21 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
38533853
verts=None, edgecolors=None,
38543854
**kwargs):
38553855
"""
3856-
Make a scatter plot of `x` vs `y`.
3856+
Make a scatter plot of *x* vs *y*.
38573857
3858-
Marker size is scaled by `s` and marker color is mapped to `c`.
3858+
Marker size is scaled by *s* and marker color is mapped to *c*.
38593859
38603860
Parameters
38613861
----------
38623862
x, y : array_like, shape (n, )
38633863
Input data
38643864
38653865
s : scalar or array_like, shape (n, ), optional
3866-
size in points^2. Default is `rcParams['lines.markersize'] ** 2`.
3866+
Size in points**2.
3867+
Default is ``rcParams['lines.markersize'] ** 2``.
38673868
38683869
c : color, sequence, or sequence of color, optional, default: 'b'
3869-
`c` can be a single color format string, or a sequence of color
3870+
*c* can be a single color format string, or a sequence of color
38703871
specifications of length `N`, or a sequence of `N` numbers to be
38713872
mapped to colors using the `cmap` and `norm` specified via kwargs
38723873
(see below). Note that `c` should not be a single numeric RGB or
@@ -3877,48 +3878,48 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
38773878
38783879
marker : `~matplotlib.markers.MarkerStyle`, optional, default: 'o'
38793880
See `~matplotlib.markers` for more information on the different
3880-
styles of markers scatter supports. `marker` can be either
3881+
styles of markers scatter supports. *marker* can be either
38813882
an instance of the class or the text shorthand for a particular
38823883
marker.
38833884
38843885
cmap : `~matplotlib.colors.Colormap`, optional, default: None
38853886
A `~matplotlib.colors.Colormap` instance or registered name.
3886-
`cmap` is only used if `c` is an array of floats. If None,
3887-
defaults to rc `image.cmap`.
3887+
*cmap* is only used if *c* is an array of floats. If ``None``,
3888+
defaults to rc ``image.cmap``.
38883889
38893890
norm : `~matplotlib.colors.Normalize`, optional, default: None
38903891
A `~matplotlib.colors.Normalize` instance is used to scale
3891-
luminance data to 0, 1. `norm` is only used if `c` is an array of
3892-
floats. If `None`, use the default :func:`normalize`.
3892+
luminance data to 0, 1. *norm* is only used if *c* is an array of
3893+
floats. If ``None``, use the default `.colors.Normalize`.
38933894
38943895
vmin, vmax : scalar, optional, default: None
3895-
`vmin` and `vmax` are used in conjunction with `norm` to normalize
3896-
luminance data. If either are `None`, the min and max of the
3897-
color array is used. Note if you pass a `norm` instance, your
3898-
settings for `vmin` and `vmax` will be ignored.
3896+
*vmin* and *vmax* are used in conjunction with *norm* to normalize
3897+
luminance data. If either are ``None``, the min and max of the
3898+
color array is used. Note if you pass a *norm* instance, your
3899+
settings for *vmin* and *vmax* will be ignored.
38993900
39003901
alpha : scalar, optional, default: None
39013902
The alpha blending value, between 0 (transparent) and 1 (opaque)
39023903
39033904
linewidths : scalar or array_like, optional, default: None
3904-
If None, defaults to (lines.linewidth,).
3905+
If ``None``, defaults to ``(lines.linewidth,)``.
39053906
39063907
verts : sequence of (x, y), optional
3907-
If `marker` is None, these vertices will be used to
3908+
If *marker* is ``None``, these vertices will be used to
39083909
construct the marker. The center of the marker is located
39093910
at (0,0) in normalized units. The overall marker is rescaled
3910-
by ``s``.
3911+
by *s*.
39113912
39123913
edgecolors : color or sequence of color, optional, default: None
3913-
If None, defaults to 'face'
3914+
If ``None``, defaults to 'face'.
39143915
39153916
If 'face', the edge color will always be the same as
39163917
the face color.
39173918
3918-
If it is 'none', the patch boundary will not
3919+
If 'none', the patch boundary will not
39193920
be drawn.
39203921
3921-
For non-filled markers, the `edgecolors` kwarg
3922+
For non-filled markers, the *edgecolors* kwarg
39223923
is ignored and forced to 'face' internally.
39233924
39243925
Returns
@@ -3931,23 +3932,23 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
39313932
39323933
See Also
39333934
--------
3934-
plot : to plot scatter plots when markers are identical in size and
3935-
color
3935+
plot : To plot scatter plots when markers are identical in size and
3936+
color.
39363937
39373938
Notes
39383939
-----
39393940
39403941
* The `plot` function will be faster for scatterplots where markers
39413942
don't vary in size or color.
39423943
3943-
* Any or all of `x`, `y`, `s`, and `c` may be masked arrays, in which
3944+
* Any or all of *x*, *y*, *s*, and *c* may be masked arrays, in which
39443945
case all masks will be combined and only unmasked points will be
39453946
plotted.
39463947
3947-
Fundamentally, scatter works with 1-D arrays; `x`, `y`, `s`, and `c`
3948+
Fundamentally, scatter works with 1-D arrays; *x*, *y*, *s*, and *c*
39483949
may be input as 2-D arrays, but within scatter they will be
3949-
flattened. The exception is `c`, which will be flattened only if its
3950-
size matches the size of `x` and `y`.
3950+
flattened. The exception is *c*, which will be flattened only if its
3951+
size matches the size of *x* and *y*.
39513952
39523953
"""
39533954

0 commit comments

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