Skip to content

Add default scatter marker option to rcParams #6328

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 29, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add 'scatter.marker' option to rcParams
  • Loading branch information
bcongdon committed Apr 23, 2016
commit 2e188bf50db85e23dfaa7d1ef415140eab1b22bb
6 changes: 5 additions & 1 deletion lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -3726,7 +3726,7 @@ def dopatch(xs, ys, **kwargs):
'facecolors', 'color'],
label_namer="y")
@docstring.dedent_interpd
def scatter(self, x, y, s=None, c=None, marker='o', cmap=None, norm=None,
def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
vmin=None, vmax=None, alpha=None, linewidths=None,
verts=None, edgecolors=None,
**kwargs):
Expand Down Expand Up @@ -3895,6 +3895,10 @@ def scatter(self, x, y, s=None, c=None, marker='o', cmap=None, norm=None,

scales = s # Renamed for readability below.

# load default marker from rcParams
if marker is None:
marker = rcParams['scatter.marker']

# to be API compatible
if marker is None and not (verts is None):
marker = (verts, 0)
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/pyplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -3138,7 +3138,7 @@ def quiverkey(*args, **kw):
# This function was autogenerated by boilerplate.py. Do not edit as
# changes will be lost
@_autogen_docstring(Axes.scatter)
def scatter(x, y, s=None, c=None, marker='o', cmap=None, norm=None, vmin=None,
def scatter(x, y, s=None, c=None, marker=None, cmap=None, norm=None, vmin=None,
vmax=None, alpha=None, linewidths=None, verts=None, edgecolors=None,
hold=None, data=None, **kwargs):
ax = gca()
Expand Down
4 changes: 4 additions & 0 deletions lib/matplotlib/rcsetup.py
Original file line number Diff line number Diff line change
Expand Up @@ -1065,6 +1065,10 @@ def validate_animation_writer_path(p):
'polaraxes.grid': [True, validate_bool], # display polar grid or
# not
'axes3d.grid': [True, validate_bool], # display 3d grid

# scatter props
'scatter.marker': ['o', six.text_type],

# TODO validate that these are valid datetime format strings
'date.autoformatter.year': ['%Y', six.text_type],
'date.autoformatter.month': ['%Y-%m', six.text_type],
Expand Down