Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.1k
Raise warning if both c and facecolors are used in scatter plot (... and related improvements in the test suite).#29130
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes from1 commit
5a26bb9f1966c253a0825a777a1580318098ae213c49f03f7823406638c092ae6e49aa39e189906c8a7672138c6319b92be348dfcfcf6ce29601975a18364c310a15f7c01a7bfd3d9dbFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
…he future we may implement c as edgecolors in that case or cause plot to fail.
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -4666,10 +4666,20 @@ def _parse_scatter_color_args(c, edgecolors, kwargs, xsize, | ||||||||||||
| edgecolors = kwcolor | ||||||||||||
| if facecolors is None: | ||||||||||||
| facecolors = kwcolor | ||||||||||||
| if edgecolors is None and not mpl.rcParams['_internal.classic_mode']: | ||||||||||||
| edgecolors = mpl.rcParams['scatter.edgecolors'] | ||||||||||||
| # Raise a warning if both `c` and `facecolor` are set (issue #24404). | ||||||||||||
| if c is not None and facecolors is not None: | ||||||||||||
| _api.warn_external( | ||||||||||||
| "You passed both c and facecolor/facecolors for the markers. " | ||||||||||||
| "Matplotlib is ignoring the facecolor " | ||||||||||||
| "in favor of what you specified in c. " | ||||||||||||
| ||||||||||||
| "You passed both c and facecolor/facecolors for the markers. " | |
| "Matplotlib is ignoring the facecolor " | |
| "in favor of what you specified in c. " | |
| "Passing both c and facecolor/facecolors for the markers " | |
| "is ambiguous. facecolor is ignored in in favor of c. " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thank you for reviewing the comment. Your change is more concise, and I understand the argument that matplotlib developers consider passing both as ambiguous.
However, a user intentionally passing both will likely not understand why it is ambiguous. They probably assumed incorrectly, as the issue's Original Poster did, that c defines both a face color and edge color and that just like adding edge color works, the face color can also be overwritten.