Skip to content

API: bar now color cycles #6364

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
May 23, 2016
Merged

Conversation

tacaswell
Copy link
Member

repeated calls to ax.bar will advance the patch color cycle.

closes #5854

attn @story645

@tacaswell tacaswell added this to the 2.0 (style change major release) milestone May 4, 2016
@@ -1975,6 +1975,8 @@ def bar(self, left, height, width=0.8, bottom=None, **kwargs):
if not self._hold:
self.cla()
color = kwargs.pop('color', None)
if color is None:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are going to need to do the keyword normalization prior to this step. How do we want to coordinate this with the normalization PR?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you touch bar in that PR?

The kwarg normalization should probably be done via a decorator.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bar is not touched in that PR. Only plot() and fill(), however, that does indirectly impact a lot of other plotting functions since they serve as the basis for many others. I don't think bar() calls fill(), though.

As for normalizing via kwargs, I'd agree, in general. We would need to be careful on any collisions with other kwargs, and if there are any organically-grown alias-handling logic that would need to be cleaned up as well.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still needs kwarg normalization

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done but used a different set of aliases. Passing in c currently does not work, no reason to let it start working.

@tacaswell tacaswell force-pushed the API_bar_color_cycles branch 2 times, most recently from 5fb3a58 to 572e0da Compare May 16, 2016 21:02
@jenshnielsen
Copy link
Member

Needs a rebase now

repeated calls to `ax.bar` will advance the patch color cycle.

closes matplotlib#5854
@tacaswell tacaswell force-pushed the API_bar_color_cycles branch from 572e0da to 5a7dab7 Compare May 22, 2016 16:57
@tacaswell
Copy link
Member Author

rebased.

@WeatherGod
Copy link
Member

restarted the failing test, but I am not sure it is a transient failure. It doesn't seem related, though.

@tacaswell
Copy link
Member Author

FAIL: matplotlib.tests.test_backend_pdf.test_hatching_legend.test is the failed test, restarted again.

@jenshnielsen jenshnielsen merged commit d063820 into matplotlib:v2.x May 23, 2016
@tacaswell tacaswell deleted the API_bar_color_cycles branch May 23, 2016 19:53
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.

4 participants