Skip to content
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

FIX: remove equality check in line2D.set_color #4778

Merged
merged 1 commit into from
Jul 24, 2015

Conversation

tacaswell
Copy link
Member

Fixes problem identified in #4771

Not doing enough validation/normalization on color on the way in.

@tacaswell tacaswell added this to the next point release milestone Jul 24, 2015
@jenshnielsen
Copy link
Member

Couldn't this alternatively be fixed by wrapping with np.any or similar?

As I understand the error in #4771 is due to color or self._color being an array

@WeatherGod
Copy link
Member

@jenshnielsen , I think it is a bit trickier than that. Technically, color can be all sorts of things, right? So you could run into a situation where the color is a numpy array of rgba values, but then someone calls set_color() with a rgb tuple. And, wouldn't the initial setting of self._color be None?

This is definitely something that traits would help with by normalizing inputs.

@jenshnielsen
Copy link
Member

@WeatherGod Makes sense. Merging this and normalizing with traitlets later sounds like a good plan

WeatherGod added a commit that referenced this pull request Jul 24, 2015
FIX: remove equality check in line2D.set_color
@WeatherGod WeatherGod merged commit 563129c into matplotlib:master Jul 24, 2015
@tacaswell tacaswell deleted the fix_color_regression branch July 29, 2015 02:13
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.

3 participants