8000 FIX: default color handling in bar3D by tacaswell · Pull Request #6990 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

FIX: default color handling in bar3D #6990

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
Aug 29, 2016

Conversation

tacaswell
Copy link
Member

If color not specified (default to None), get the next color from the
axes color cycle.

closes #6989

@tacaswell tacaswell added this to the 2.0 (style change major release) milestone Aug 27, 2016
@matthew-brett
Copy link
Contributor

Is there any way of adding a test?

# no color specified
facecolors = [None] * len(x)
elif len(color) == len(x):
color = self._get_lines.get_next_color()
Copy link
Member

Choose a reason for hiding this comment

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

This is a string, generally, no? Which means it could match the next condition if there are 6 bars, or 1 bar, or whatever the length of the colour string is. I think that maybe isn't expected to happen?

Copy link
Member

Choose a reason for hiding this comment

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

also, I don't think it would be self._get_lines. That would be for line plots.

@tacaswell
Copy link
Member Author

I looked at modifying one of the existing tests, but they are testing with funny color vectors.

If color not specified (default to `None`), get the next color from the
axes color cycle.

closes matplotlib#6989
@tacaswell tacaswell force-pushed the fix_bar3D_dflt_color branch from 49e3940 to e0dbfdf Compare August 27, 2016 23:44
@mdboom mdboom merged commit 5e038b5 into matplotlib:v2.x Aug 29, 2016
@tacaswell tacaswell deleted the fix_bar3D_dflt_color branch August 29, 2016 19:14
@WeatherGod
Copy link
Member

my comment wasn't addressed. It is pulling from the wrong color cycle.

@WeatherGod
Copy link
Member

Pretty sure it should be self._get_patches_for_fill.get_next_color(), which is what Axes.bar() uses.

@tacaswell
Copy link
Member Author

@WeatherGod Sorry, I missed that. I think you commented after I checked, but before I pushed the change.

tacaswell added a commit to tacaswell/matplotlib that referenced this pull request Aug 29, 2016
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
0