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

scatter(): edgecolor takes precedence over edgecolors #18392

Copy link
Copy link
Closed
@MaozGelbart

Description

@MaozGelbart
Issue body actions

Bug report

Bug summary

edgecolors is an explicit kwarg to plt.scatter(). However edgecolor kwarg takes precedence over it, although the function used to obtain the edgecolors (self._parse_scatter_color_args()) documents that edgecolors should take precedence:

Argument precedence for edgecolors:
edgecolors (is an explicit kw argument in scatter())
kwargs['edgecolor']
kwargs['color'] (==kwcolor)
'face' if not in classic mode else None

This also reproduces when substituting edgecolor with ec.

Code for reproduction

import matplotlib.pyplot as plt
c = plt.scatter([], [], edgecolors=[0,1,0,1], edgecolor=[1,0,0,1])
c.get_edgecolors()

Actual outcome

array([[1., 0., 0., 1.]])

Expected outcome

array([[0., 1., 0., 1.]])

Matplotlib version

  • Operating system: macOS
  • Matplotlib version: 3.3.1
  • Matplotlib backend (print(matplotlib.get_backend())): MacOSX
  • Python version: 3.8.5
  • Jupyter version (if applicable):
  • Other libraries:

Installed from conda-forge

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

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