PROBLEM
When using matplotlib and plotting 3d bars on a chart I got wrong normals values on some bar faces.
EXAMPLE
When I plot a high density bins graph, with 240 bars, I get this result:
See that some faces of some bars are wrong? The bars Z order gets wrong too.
ABOUT
I'm using the latest stable version of Matplotlib and Numpy. My Python version is 2.7.3
LOGS
This is the only warning the I get from console:
RuntimeWarning: invalid value encountered in divide for n in normals])
Any help is much appreciated.
EDIT
With @Saullo Castro answer, this is the new graph produced:
Or, using the sample presented in the answer (see the region marked with red dots):
The only problem left is the bar face on the top, but is already pretty good. If anyone has any comments on this, feel free to help me.