Skip to content

bug fix - set_facecolor/set_edgecolor not working for some 3D artists #10797

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

Conversation

xiaoshiqi
Copy link

@xiaoshiqi xiaoshiqi commented Mar 15, 2018

PR Summary

fixed set_facecolor(set_facecolors), set_edgecolor(set_edgecolors), and set_color not working for some 3Dartists

this bug was originally mentioned in #9725
this PR is an extension of my earlier attempt #10489

PR Checklist

  • Has Pytest style unit tests
  • Code is PEP 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

… (the one cause the problem), hopefully it works
@WeatherGod
Copy link
Member

Ok, it is taking me some time to think through the implications of this change. It is obvious that this fixes a real problem, so that is a definite plus. My main problem is that these new methods are still not defined in the classes, so only artists that go through this conversion processes (admittedly, that is most of them) will get these special methods defined. This will cause confusion for users, as well as the maintainers because debugging will be harder to do.

If you are looking to avoid duplicating code, you are free to make a private mixin class _Color3DCollection that has these methods properly defined, and have Poly3DCollection and Patch3DCollection inherit it. Or just duplicate the code, it isn't all that much there.

@xiaoshiqi
Copy link
Author

@WeatherGod looks like Poly3DCollection was already fixed years ago. should I change it to make the style unified?

@jklymak
Copy link
Member

jklymak commented Mar 24, 2021

I believe this was superseded by #18189 so I'm closing, but feel free to re-open. Sorry @xiaoshiqi that this never got in, and thanks for your efforts.

@jklymak jklymak closed this Mar 24, 2021
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