Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ad81e3f

Browse filesBrowse files
committed
Merge pull request #6328 from benjamincongdon/ft-scatter-marker-rc
Add default scatter marker option to rcParams
1 parent 668f292 commit ad81e3f
Copy full SHA for ad81e3f

File tree

Expand file treeCollapse file tree

6 files changed

+18
-2
lines changed
Filter options
Expand file treeCollapse file tree

6 files changed

+18
-2
lines changed

‎doc/users/whats_new/rcparams.rst

Copy file name to clipboardExpand all lines: doc/users/whats_new/rcparams.rst
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ Configuration (rcParams)
1616
+----------------------------+--------------------------------------------------+
1717
|`date.autoformatter.second` | format string for 'second' scale times |
1818
+----------------------------+--------------------------------------------------+
19+
|`scatter.marker` | default marker for scatter plot |
20+
+----------------------------+--------------------------------------------------+
1921
|`svg.hashsalt` | see note |
2022
+----------------------------+--------------------------------------------------+
2123

‎lib/matplotlib/axes/_axes.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axes/_axes.py
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3732,7 +3732,7 @@ def dopatch(xs, ys, **kwargs):
37323732
'facecolors', 'color'],
37333733
label_namer="y")
37343734
@docstring.dedent_interpd
3735-
def scatter(self, x, y, s=None, c=None, marker='o', cmap=None, norm=None,
3735+
def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
37363736
vmin=None, vmax=None, alpha=None, linewidths=None,
37373737
verts=None, edgecolors=None,
37383738
**kwargs):
@@ -3903,6 +3903,10 @@ def scatter(self, x, y, s=None, c=None, marker='o', cmap=None, norm=None,
39033903

39043904
scales = s # Renamed for readability below.
39053905

3906+
# load default marker from rcParams
3907+
if marker is None:
3908+
marker = rcParams['scatter.marker']
3909+
39063910
# to be API compatible
39073911
if marker is None and not (verts is None):
39083912
marker = (verts, 0)

‎lib/matplotlib/mpl-data/stylelib/classic.mplstyle

Copy file name to clipboardExpand all lines: lib/matplotlib/mpl-data/stylelib/classic.mplstyle
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,9 @@ contour.corner_mask : True
325325
# errorbar props
326326
errorbar.capsize: 3
327327

328+
# scatter props
329+
scatter.marker: o
330+
328331
### Boxplots
329332
boxplot.bootstrap: None
330333
boxplot.boxprops.color: b

‎lib/matplotlib/pyplot.py

Copy file name to clipboardExpand all lines: lib/matplotlib/pyplot.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3231,7 +3231,7 @@ def quiverkey(*args, **kw):
32313231
# This function was autogenerated by boilerplate.py. Do not edit as
32323232
# changes will be lost
32333233
@_autogen_docstring(Axes.scatter)
3234-
def scatter(x, y, s=None, c=None, marker='o', cmap=None, norm=None, vmin=None,
3234+
def scatter(x, y, s=None, c=None, marker=None, cmap=None, norm=None, vmin=None,
32353235
vmax=None, alpha=None, linewidths=None, verts=None, edgecolors=None,
32363236
hold=None, data=None, **kwargs):
32373237
ax = gca()

‎lib/matplotlib/rcsetup.py

Copy file name to clipboardExpand all lines: lib/matplotlib/rcsetup.py
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,6 +1053,10 @@ def validate_hist_bins(s):
10531053
'polaraxes.grid': [True, validate_bool], # display polar grid or
10541054
# not
10551055
'axes3d.grid': [True, validate_bool], # display 3d grid
1056+
1057+
# scatter props
1058+
'scatter.marker': ['o', six.text_type],
1059+
10561060
# TODO validate that these are valid datetime format strings
10571061
'date.autoformatter.year': ['%Y', six.text_type],
10581062
'date.autoformatter.month': ['%Y-%m', six.text_type],

‎matplotlibrc.template

Copy file name to clipboardExpand all lines: matplotlibrc.template
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,9 @@ backend : $TEMPLATE_BACKEND
461461
# If Numpy 1.11 or later is
462462
# installed, may also be `auto`
463463

464+
### SCATTER PLOTS
465+
#scatter.marker : o # The default marker type for scatter plots.
466+
464467
### Agg rendering
465468
### Warning: experimental, 2008/10/10
466469
#agg.path.chunksize : 0 # 0 to disable; values in the range

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.