-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
scatter: fix marker kwarg bug. Closes #4073, #3895. #4079
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This also raises a question: does anyone know why scatter still has the undocumented "verts" kwarg? We should either remove it, with deprecation if necessary, or include it in the docstring. |
I am fine with removing it as it looks like it is one more way to specify the marker shape. Probably do need deprecation cycle though.
|
4cc5c39
to
a501621
Compare
I also tried to clean up some of the scatter code and documentation, together with related documentation in collections. I added a test.
7c5d8fc
to
7acb52d
Compare
Wow. Good find guys. |
Issue fixed on matplotlib master matplotlib/matplotlib#4079
if edgecolors is None: | ||
edgecolors = co | ||
if facecolors is None: | ||
facecolors = co |
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.
Coming in late to the discussion but I have just spent a few minutes trying to determine what I did wrong on my scatter graphs...
I thought c
stood as an acronym for color
as fc
stands for facecolor
etcetera... however this does not apply here, specifying color='green'
instead of c='green'
means you set the edge-colour to green instead of the face-colour...
Should I open an issue/PR about this? Or can people live with this inconsistency?
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.
As far as I understand it, 'c' should be an alias for 'color'. Furthermore,
'color' should specify both edge and face colors, unless explicitly
overriden by 'facecolor' and such.
On Wed, Apr 29, 2015 at 12:45 PM, OceanWolf [email protected]
wrote:
In lib/matplotlib/axes/_axes.py
#4079 (comment):
if ec is not None:
edgecolors = ec
fc = kwargs.pop('facecolor', None)
if fc is not None:
facecolors = fc
fc = kwargs.pop('facecolors', None)
if fc is not None:
facecolors = fc
# 'color' should be deprecated in scatter, or clearly defined;
# since it isn't, I am giving it low priority.
co = kwargs.pop('color', None)
if co is not None:
if edgecolors is None:
edgecolors = co
if facecolors is None:
facecolors = co
Coming in late to the discussion but I have just spent a few minutes
trying to determine what I did wrong on my scatter graphs...I thought c stood as an acronym for color as fc stands for facecolor
etcetera... however this does not apply here, specifying color='green'
instead of c='green' means you set the edge-colour to green instead of
the face-colour...Should I open an issue/PR about this? Or can people live with this
inconsistency?—
Reply to this email directly or view it on GitHub
https://github.com/matplotlib/matplotlib/pull/4079/files#r29355046.
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.
This is a confusing mess for historical reasons. It looks like there might be a need for "facecolors=None" in the arg list, along with "edgecolors=None". I suspect I had a reason for not including this in the PR, but I don't remember; maybe it is worth a try.
I also tried to clean up some of the scatter code and documentation,
together with related documentation in collections. I added a test.