Description
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.
edgecolorand
ec`).