-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
3D bar chart with shading is rendered incorrectly #13728
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
Comments
There is clearly room for improvement, this would be the place to start: matplotlib/lib/mpl_toolkits/mplot3d/art3d.py Lines 705 to 710 in 9faf231
|
Setting However, this only works because the examples are drawing uniformly shaped bars, and the object with the smaller minimum z coordinate is guaranteed to be at the front. @ImportanceOfBeingErnest Im curious: is there a reasoning behind default |
That image shows the same problem as the one from the original post. So, no it's not fixed. Since neither A possible intermediate solution is to take user-defined plot orders, as in #14508 or #12744 also for the Poly3DCollection. |
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help! |
Since there is a recent PR for this, it makes sense to keep it. |
Bug report
Bug summary
Z-order of rendered planes in 3d bar chart produced by bar3d is wrong. It is seen even in the example here https://matplotlib.org/gallery/mplot3d/3d_bars.html. One of the bars (at location 2, 4, height 6) is drawn on top of the highest bar, even though it supposed to be behind it.
Code for reproduction
A small modification of the code from example to make it more pronounced.
Actual outcome
Everything to the right from diagonal is rendered incorrectly.
Matplotlib version
Tested on two machines with the same results.
matplotlib 2.1.2 py36h6d6146d_0
and
matplotlib 3.0.3 py37_0 conda-forge
print(matplotlib.get_backend())
): module://ipykernel.pylab.backend_inline3.6.0 |Anaconda custom (64-bit)| (default, Dec 23 2016, 13:19:00)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)]
and
3.7.1 | packaged by conda-forge | (default, Mar 13 2019, 13:32:59) [MSC v.1900 64 bit (AMD64)]
ipython 5.1.0 py36_1
and
ipython 7.3.0 py37h39e3cac_0 conda-forge
The text was updated successfully, but these errors were encountered: