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

Raise when both singular and plural scatter attributes are specified #19120

Copy link
Copy link
Closed
@mwaskom

Description

@mwaskom
Issue body actions

Problem

plt.scatter accepts both singular and plural forms of the linewidth(s) and edgecolor(s) attributes. The plural forms are documented in the function signature, but the singular forms actually take precedence if both are specified.

This adds some complexity for downstream libraries and confusion for their users (cf. mwaskom/seaborn#2384).

Proposed Solution

Small change: Matplotlib could raise when both the singular and plural forms are specified.

Larger change: I will confess that I don't know why the plural forms of the kwargs exist. If there's not a strong reason for the duplication, perhaps they could be deprecated, or at least "formally discouraged"?

Additional context and prior art

Scatter does a lot of argument checking on the c/color parameters (too much at times, 😉), so there's some local precedence for a lot of handholding. On the other hand, matplotlib generally doesn't raise when both long- and short-forms of kwargs are given e.g. edgecolorandec`).

weber-s

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.