Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Open
Description
Bug summary
When I make a 3D bar chart with Matplotlib and change the z axis limits usingax.set_zlim(newMin, newMax)
the part of the bar charts below the new z axis minimum value appears above the x and y axis. I would like to ensure that the x and y axis always renders at the top, but I don't know how to achieve this. I triedax.set_zorder(bigNumber)
andax.xaxis.set_zorder(bigNumber)
, but it didn't change anything.
Code for reproduction
fig,ax=plt.subplots(subplot_kw= {"projection" :"3d"})ax.bar3d([1,1,2,2], [1,2,1,2],0,1,1, [2,3,1,4])ax.set_zlim(2,4)ax.set_zorder(10000000)# does not helpplt.show()
Actual outcome
The actual outcome looks like this, where the bar charts render over the x and y axis:
Expected outcome
Either left or right would be expected outcome:
Additional information
No response
Operating system
Windows
Matplotlib Version
3.6.0
Matplotlib Backend
TkAgg
Python version
3.10.6
Jupyter version
No response
Installation
pip