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

Skip to content

Behaviour of c=None is inconsistent in 2.0 #7899

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

Closed
Zaharid opened this issue Jan 20, 2017 · 5 comments
Closed

Behaviour of c=None is inconsistent in 2.0 #7899

Zaharid opened this issue Jan 20, 2017 · 5 comments
Assignees
Milestone

Comments

@Zaharid
Copy link

Zaharid commented Jan 20, 2017

The following code

import numpy as np
import matplotlib.pyplot as plt
f,ax = plt.subplots()
x = np.arange(10)
y = 2*x

plt.errorbar(x,y, c=None)
plt.errorbar(x,2*y, c=None)

Produces two lines with the same color (first one of the cycle). In 1.5 it is two different colors.
It is also two colors if I change errorbar to plot.

@phobson phobson added this to the 2.0.1 (next bug fix release) milestone Jan 23, 2017
@dstansby
Copy link
Member

dstansby commented Feb 3, 2017

This bisects back to c8a365a

@tacaswell
Copy link
Member

Sigh, the problem is that there is a user supplied color, so the color cycle is being ignored in errorbar and falling through to the default line color.

@tacaswell tacaswell self-assigned this Feb 6, 2017
@tacaswell
Copy link
Member

@Zaharid Sorry for my whining above.

Thank you for a clear bug report! Very much appreciate it 😄 .

tacaswell added a commit to tacaswell/matplotlib that referenced this issue Feb 7, 2017
Passing in `None` is a request from the user to 'do the default
thing', but by keeping the key:value in the kwargs dict it prevents
the default errorbar behavior and falls through to default Line2D
behavior which is likely not what is wanted.

closes matplotlib#7899
@jenshnielsen
Copy link
Member

Should this be closed now that #8037 is merged?

@dstansby
Copy link
Member

Yep, looks fixed to me.

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

No branches or pull requests

5 participants