Skip to content

Commit 11def88

Browse files
bsipocztimhoffm
authored andcommitted
Adding rcParams[‘scatter.edgecolors’] defaulting to ‘face’ (#12992)
* Adding rcParams[‘scatter.edgecolors’] defaulting to ‘face’ * Adding scatter.edgecolors to matplotlibrc template * Add back mentioning sequence of color * Update lib/matplotlib/axes/_axes.py Co-Authored-By: bsipocz <b.sipocz@gmail.com>
1 parent 3221c94 commit 11def88

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4102,7 +4102,7 @@ def _parse_scatter_color_args(c, edgecolors, kwargs, xshape, yshape,
41024102
facecolors = kwcolor
41034103

41044104
if edgecolors is None and not rcParams['_internal.classic_mode']:
4105-
edgecolors = 'face'
4105+
edgecolors = rcParams['scatter.edgecolors']
41064106

41074107
c_was_none = c is None
41084108
if c is None:
@@ -4248,12 +4248,16 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
42484248
is 'face'. You may want to change this as well.
42494249
If *None*, defaults to rcParams ``lines.linewidth``.
42504250
4251-
edgecolors : color or sequence of color, optional, default: 'face'
4251+
edgecolors : {'face', 'none', *None*} or color or sequence of color, \
4252+
optional.
42524253
The edge color of the marker. Possible values:
42534254
42544255
- 'face': The edge color will always be the same as the face color.
42554256
- 'none': No patch boundary will be drawn.
4256-
- A matplotib color.
4257+
- A matplotib color or sequence of color.
4258+
4259+
Defaults to ``None``, in which case it takes the value of
4260+
:rc:`scatter.edgecolors` = 'face'.
42574261
42584262
For non-filled markers, the *edgecolors* kwarg is ignored and
42594263
forced to 'face' internally.

lib/matplotlib/rcsetup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,6 +1230,7 @@ def _validate_linestyle(ls):
12301230

12311231
# scatter props
12321232
'scatter.marker': ['o', validate_string],
1233+
'scatter.edgecolors': ['face', validate_string],
12331234

12341235
# TODO validate that these are valid datetime format strings
12351236
'date.autoformatter.year': ['%Y', validate_string],

matplotlibrc.template

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@
418418
#legend.scatterpoints : 1 ## number of scatter points
419419
#legend.markerscale : 1.0 ## the relative size of legend markers vs. original
420420
#legend.fontsize : medium
421-
#legend.title_fontsize : None ## None sets to the same as the default axes.
421+
#legend.title_fontsize : None ## None sets to the same as the default axes.
422422
## Dimensions as fraction of fontsize:
423423
#legend.borderpad : 0.4 ## border whitespace
424424
#legend.labelspacing : 0.5 ## the vertical space between the legend entries
@@ -488,6 +488,7 @@
488488

489489
#### SCATTER PLOTS
490490
#scatter.marker : o ## The default marker type for scatter plots.
491+
#scatter.edgecolors : face ## The default edgecolors for scatter plots.
491492

492493
#### Agg rendering
493494
#### Warning: experimental, 2008/10/10

0 commit comments

Comments
 (0)