Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2e188bf

Browse files
committed
Add 'scatter.marker' option to rcParams
1 parent 2b84f88 commit 2e188bf

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3726,7 +3726,7 @@ def dopatch(xs, ys, **kwargs):
37263726
'facecolors', 'color'],
37273727
label_namer="y")
37283728
@docstring.dedent_interpd
3729-
def scatter(self, x, y, s=None, c=None, marker='o', cmap=None, norm=None,
3729+
def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
37303730
vmin=None, vmax=None, alpha=None, linewidths=None,
37313731
verts=None, edgecolors=None,
37323732
**kwargs):
@@ -3895,6 +3895,10 @@ def scatter(self, x, y, s=None, c=None, marker='o', cmap=None, norm=None,
38953895

38963896
scales = s # Renamed for readability below.
38973897

3898+
# load default marker from rcParams
3899+
if marker is None:
3900+
marker = rcParams['scatter.marker']
3901+
38983902
# to be API compatible
38993903
if marker is None and not (verts is None):
39003904
marker = (verts, 0)

lib/matplotlib/pyplot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3138,7 +3138,7 @@ def quiverkey(*args, **kw):
31383138
# This function was autogenerated by boilerplate.py. Do not edit as
31393139
# changes will be lost
31403140
@_autogen_docstring(Axes.scatter)
3141-
def scatter(x, y, s=None, c=None, marker='o', cmap=None, norm=None, vmin=None,
3141+
def scatter(x, y, s=None, c=None, marker=None, cmap=None, norm=None, vmin=None,
31423142
vmax=None, alpha=None, linewidths=None, verts=None, edgecolors=None,
31433143
hold=None, data=None, **kwargs):
31443144
ax = gca()

lib/matplotlib/rcsetup.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,6 +1065,10 @@ def validate_animation_writer_path(p):
10651065
'polaraxes.grid': [True, validate_bool], # display polar grid or
10661066
# not
10671067
'axes3d.grid': [True, validate_bool], # display 3d grid
1068+
1069+
# scatter props
1070+
'scatter.marker': ['o', six.text_type],
1071+
10681072
# TODO validate that these are valid datetime format strings
10691073
'date.autoformatter.year': ['%Y', six.text_type],
10701074
'date.autoformatter.month': ['%Y-%m', six.text_type],

0 commit comments

Comments
 (0)