8000 No edges on filled things by default by mdboom · Pull Request #5596 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

No edges on filled things by default #5596

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 6 commits into from
Dec 2, 2015
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

8000
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
API: Line2D and scatter default to automatic
 - for plot, the default marker edge is now the color of the marker
 - for scatter the marker edge color now follows the face color

closes #4679
  • Loading branch information
tacaswell authored and mdboom committed Dec 1, 2015
commit de7bc9331c19ce378df3a3c066cbf1b87fceb58a
16 changes: 12 additions & 4 deletions lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -3762,11 +3762,16 @@ def scatter(self, x, y, s=20, c=None, marker='o', cmap=None, norm=None,
If None, defaults to (lines.linewidth,).

edgecolors : color or sequence of color, optional, default: None
If None, defaults to (patch.edgecolor).
If None, defaults to 'face'

If 'face', the edge color will always be the same as
the face color. If it is 'none', the patch boundary will not
be drawn. For non-filled markers, the `edgecolors` kwarg
is ignored; color is determined by `c`.
the face color.

If it is 'none', the patch boundary will not
be drawn.

For non-filled markers, the `edgecolors` kwarg
is ignored and forced to 'face' internally.

Returns
-------
Expand Down Expand Up @@ -3823,6 +3828,9 @@ def scatter(self, x, y, s=20, c=None, marker='o', cmap=None, norm=None,
else:
c = 'b' # The original default

if edgecolors is None and not rcParams['_internal.classic_mode']:
edgecolors = 'face'

self._process_unit_info(xdata=x, ydata=y, kwargs=kwargs)
x = self.convert_xunits(x)
y = self.convert_yunits(y)
Expand Down
12 changes: 6 additions & 6 deletions lib/matplotlib/lines.py
Original file line number Diff line number Diff line change
Expand Up @@ -849,12 +849,12 @@ def get_marker(self):
def get_markeredgecolor(self):
mec = self._markeredgecolor
if (is_string_like(mec) and mec == 'auto'):
if self._marker.get_marker() in ('.', ','):
return self._color
if self._marker.is_filled() and self.get_fillstyle() != 'none':
return 'k' # Bad hard-wired default...
else:
return self._color
if rcParams['_internal.classic_mode']:
if self._marker.get_marker() in ('.', ','):
return self._color
if self._marker.is_filled() and self.get_fillstyle() != 'none':
return 'k' # Bad hard-wired default...
return self._color
else:
return mec

Expand Down
0