Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Merged
merged 2 commits into from
Feb 19, 2015

Conversation

efiring
Copy link
Member

@efiring efiring commented Feb 8, 2015

I also tried to clean up some of the scatter code and documentation,
together with related documentation in collections. I added a test.

@efiring
Copy link
Member Author

efiring commented Feb 8, 2015

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.

@tacaswell tacaswell added this to the 1.5.0 milestone Feb 8, 2015
@tacaswell
Copy link
Member

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.

marker can also be array like as MarkerStyle can take arrays as input.

I also tried to clean up some of the scatter code and documentation,
together with related documentation in collections.  I added a test.
@mdboom
Copy link
Member

mdboom commented Feb 9, 2015

Wow. Good find guys.

@tacaswell
Copy link
Member

Merged this locally so that I could add a commit (f200421) to document the code removal on top.

Merged to master as 86e5e65

philippjfr added a commit to holoviz/holoviews that referenced this pull request Mar 25, 2015
if edgecolors is None:
edgecolors = co
if facecolors is None:
facecolors = co
Copy link
Member

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?

Copy link
Member

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.

Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants