X Tutup
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions doc/users/whats_new/rcparams.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ Configuration (rcParams)
+----------------------------+--------------------------------------------------+
|`date.autoformatter.second` | format string for 'second' scale times |
+----------------------------+--------------------------------------------------+
|`scatter.marker` | default marker for scatter plot |
+----------------------------+--------------------------------------------------+
|`svg.hashsalt` | see note |
+----------------------------+--------------------------------------------------+

Expand Down
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
3 changes: 3 additions & 0 deletions lib/matplotlib/mpl-data/stylelib/classic.mplstyle
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,9 @@ contour.corner_mask : True
# errorbar props
errorbar.capsize: 3

# scatter props
scatter.marker: o

### Boxplots
boxplot.bootstrap: None
boxplot.boxprops.color: b
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
3 changes: 3 additions & 0 deletions matplotlibrc.template
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,9 @@ backend : $TEMPLATE_BACKEND
# If Numpy 1.11 or later is
# installed, may also be `auto`

### SCATTER PLOTS
#scatter.marker : o # The default marker type for scatter plots.

### Agg rendering
### Warning: experimental, 2008/10/10
#agg.path.chunksize : 0 # 0 to disable; values in the range
Expand Down
X Tutup