@@ -3951,74 +3951,74 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
3951
3951
verts = None , edgecolors = None ,
3952
3952
** kwargs ):
3953
3953
"""
3954
- Make a scatter plot of *x* vs *y*.
3955
-
3956
- Marker size is scaled by *s* and marker color is mapped to *c*.
3954
+ A scatter plot of *y* vs *x* with varying marker size and/or color.
3957
3955
3958
3956
Parameters
3959
3957
----------
3960
3958
x, y : array_like, shape (n, )
3961
- Input data
3959
+ The data positions.
3962
3960
3963
3961
s : scalar or array_like, shape (n, ), optional
3964
- Size in points**2.
3962
+ The marker size in points**2.
3965
3963
Default is ``rcParams['lines.markersize'] ** 2``.
3966
3964
3967
3965
c : color, sequence, or sequence of color, optional, default: 'b'
3968
- *c* can be a single color format string, or a sequence of color
3969
- specifications of length `N`, or a sequence of `N` numbers to be
3970
- mapped to colors using the `cmap` and `norm` specified via kwargs
3971
- (see below). Note that `c` should not be a single numeric RGB or
3972
- RGBA sequence because that is indistinguishable from an array of
3973
- values to be colormapped. `c` can be a 2-D array in which the
3974
- rows are RGB or RGBA, however, including the case of a single
3975
- row to specify the same color for all points.
3966
+ The marker color. Possible values:
3967
+
3968
+ - A single color format string.
3969
+ - A sequence of color specifications of length n.
3970
+ - A sequence of n numbers to be mapped to colors using *cmap* and
3971
+ *norm*.
3972
+ - A 2-D array in which the rows are RGB or RGBA.
3973
+
3974
+ Note that *c* should not be a single numeric RGB or RGBA sequence
3975
+ because that is indistinguishable from an array of values to be
3976
+ colormapped. If you want to specify the same RGB or RGBA value for
3977
+ all points, use a 2-D array with a single row.
3976
3978
3977
3979
marker : `~matplotlib.markers.MarkerStyle`, optional, default: 'o'
3978
- See `~matplotlib.markers` for more information on the different
3979
- styles of markers scatter supports. *marker* can be either
3980
- an instance of the class or the text shorthand for a particular
3981
- marker.
3980
+ The marker style. *marker* can be either an instance of the class
3981
+ or the text shorthand for a particular marker.
3982
+ See `~matplotlib.markers` for more information marker styles.
3982
3983
3983
3984
cmap : `~matplotlib.colors.Colormap`, optional, default: None
3984
- A `~matplotlib.colors. Colormap` instance or registered name.
3985
- *cmap* is only used if *c* is an array of floats. If ``None``,
3986
- defaults to rc ``image.cmap``.
3985
+ A `. Colormap` instance or registered colormap name. *cmap* is only
3986
+ used if *c* is an array of floats. If ``None``, defaults to rc
3987
+ ``image.cmap``.
3987
3988
3988
3989
norm : `~matplotlib.colors.Normalize`, optional, default: None
3989
- A `~matplotlib.colors. Normalize` instance is used to scale
3990
- luminance data to 0, 1. *norm* is only used if *c* is an array of
3991
- floats. If ``None``, use the default `.colors.Normalize`.
3990
+ A `~. Normalize` instance is used to scale luminance data to 0, 1.
3991
+ *norm* is only used if *c* is an array of floats. If *None*, use
3992
+ the default `.colors.Normalize`.
3992
3993
3993
3994
vmin, vmax : scalar, optional, default: None
3994
3995
*vmin* and *vmax* are used in conjunction with *norm* to normalize
3995
- luminance data. If either are `` None`` , the min and max of the
3996
- color array is used. Note if you pass a *norm* instance, your
3997
- settings for *vmin* and *vmax* will be ignored .
3996
+ luminance data. If None, the respective min and max of the color
3997
+ array is used. *vmin* and *vmax* are ignored if you pass a *norm*
3998
+ instance .
3998
3999
3999
4000
alpha : scalar, optional, default: None
4000
- The alpha blending value, between 0 (transparent) and 1 (opaque)
4001
+ The alpha blending value, between 0 (transparent) and 1 (opaque).
4001
4002
4002
4003
linewidths : scalar or array_like, optional, default: None
4003
- If ``None``, defaults to ``(lines.linewidth,)``.
4004
+ The linewidth of the marker edges. Note: The default *edgecolors*
4005
+ is 'face'. You may want to change this as well.
4006
+ If *None*, defaults to rcParams ``lines.linewidth``.
4004
4007
4005
4008
verts : sequence of (x, y), optional
4006
- If *marker* is ``None``, these vertices will be used to
4007
- construct the marker. The center of the marker is located
4008
- at (0,0) in normalized units. The overall marker is rescaled
4009
- by *s*.
4010
-
4011
- edgecolors : color or sequence of color, optional, default: None
4012
- If ``None``, defaults to 'face'.
4009
+ If *marker* is *None*, these vertices will be used to construct
4010
+ the marker. The center of the marker is located at (0, 0) in
4011
+ normalized units. The overall marker is rescaled by *s*.
4013
4012
4014
- If 'face', the edge color will always be the same as
4015
- the face color.
4013
+ edgecolors : color or sequence of color, optional, default: 'face'
4014
+ The edge color of the marker. Possible values:
4016
4015
4017
- If 'none', the patch boundary will not
4018
- be drawn.
4016
+ - 'face': The edge color will always be the same as the face color.
4017
+ - 'none': No patch boundary will be drawn.
4018
+ - A matplotib color.
4019
4019
4020
- For non-filled markers, the *edgecolors* kwarg
4021
- is ignored and forced to 'face' internally.
4020
+ For non-filled markers, the *edgecolors* kwarg is ignored and
4021
+ forced to 'face' internally.
4022
4022
4023
4023
Returns
4024
4024
-------
@@ -4036,14 +4036,14 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
4036
4036
Notes
4037
4037
-----
4038
4038
4039
- * The `plot` function will be faster for scatterplots where markers
4039
+ * The `. plot` function will be faster for scatterplots where markers
4040
4040
don't vary in size or color.
4041
4041
4042
4042
* Any or all of *x*, *y*, *s*, and *c* may be masked arrays, in which
4043
4043
case all masks will be combined and only unmasked points will be
4044
4044
plotted.
4045
4045
4046
- Fundamentally, scatter works with 1-D arrays; *x*, *y*, *s*, and *c*
4046
+ * Fundamentally, scatter works with 1-D arrays; *x*, *y*, *s*, and *c*
4047
4047
may be input as 2-D arrays, but within scatter they will be
4048
4048
flattened. The exception is *c*, which will be flattened only if its
4049
4049
size matches the size of *x* and *y*.
0 commit comments