On Thu, Jan 6, 2011 at 12:57 AM, Sebastian Voigt <svoigt@gmx.de> wrote:
Am 06.01.2011 02:14, schrieb Benjamin Root:
On Wed, Jan 5, 2011 at 6:15 PM, Sebastian Voigt <svoigt@gmx.de> wrote:
I've been running into the well known rendering problems with mplot3d's
bar3d function. After two days of trying to get acceptable results
without success: Is it possible to simply disable z-sorting (whoops)?

I want to generate static plots from experimental data, all using the
same perspective, so I know the order of the bars to be plotted. It's a
no-brainer to provide the data vectors in this appropriate order, which
I tried too - didn't work. Even if I provide explicit zorders for all
Poly3dCollections in axes.collections (single-plotting each bar),
everything gets messed up after showing the plot window.

So is there any way to create the bars just in the order of the data
vectors passed to bar3d (or keep the order/zorder in axes.collections)?

    - Sebastian Voigt -

There are well-known rendering issues with mplot3d in general, but I am not aware of one with respect to bar3d.  Can you please include a image of the rendering defect that you are seeing?

And no, there is no way to disable z-sorting that I am aware of because it is inherent in matplotlib's system.  mplot3d merely utilizes the drawing facilities that matplotlib provides.

Ben Root

It's exactly the same problem as described in


see the second sample pic in this post. If I cannot disable z-sorting, how can I control it? Artist have a set_zorder() method, but providing correct z-levels for all my artists seems to be ignored.


Sebastian,  looking at those images, I have to wonder if there is a bug in how bar3d is reporting the z-order.  These rendering mistakes do not seem to follow the same patterns that I have seen with manually setting polygon objects.  I will take a deeper look into it.

Ben Root