8000
Raise when both singular and plural scatter attributes are specified #19120
Milestone
Uh oh!
There was an error while loading. Please reload this page.
Problem
plt.scatter
accepts both singular and plural forms of thelinewidth(s)
andedgecolor(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 givene.g.
edgecolorand
ec`).The text was updated successfully, but these errors were encountered: