8000 Fix scatter edgecolor for unfilled points · matplotlib/matplotlib@28696b9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 28696b9

Browse files
committed
Fix scatter edgecolor for unfilled points
For unfilled markers, the edgecolor -- if specified -- has precedence over the facecolor. closes has2k1/plotnine#100
1 parent 49d5ced commit 28696b9

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

doc/api/api_changes/2017-12-14-HK.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Scatter plot unfilled marker edgecolor
2+
--------------------------------------
3+
4+
For :meth:`~matplotlib.axes.Axes.scatter`, when both the `facecolor`
5+
and `edgecolor` are specified for unfilled marker types, the `edgecolor`
6+
is used. Previously, the points took on the `facecolor`.

lib/matplotlib/axes/_axes.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4024,7 +4024,8 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
40244024
path = marker_obj.get_path().transformed(
40254025
marker_obj.get_transform())
40264026
if not marker_obj.is_filled():
4027-
edgecolors = 'face'
4027+
if edgecolors is None:
4028+
edgecolors = 'face'
40284029
linewidths = rcParams['lines.linewidth']
40294030

40304031
offsets = np.column_stack([x, y])

0 commit comments

Comments
 (0)
0