Is there a way to remove the padding between the bottom of the bars in the 3D bar plot and the boundaries of the plot? My attempts to use ax.set_zmargin(0) or ax.set_zlim([0, None]) have not had an impact on the result.
I would like there to be no extra graphed space after the '0' tick on the z-axis. The bottom z-axis grid lines should be flush with the bottom of the bars in the plot. The problem can be seen in the Matplotlib 3D bar plot demo code below.
import numpy as np
import matplotlib.pyplot as plt
# setup the figure and axes
fig = plt.figure()
ax = fig.add_subplot(projection='3d')
# fake data
_x = np.arange(4)
_y = np.arange(5)
_xx, _yy = np.meshgrid(_x, _y)
x, y = _xx.ravel(), _yy.ravel()
top = x + y
bottom = np.zeros_like(top)
width = depth = 1
ax.bar3d(x, y, bottom, width, depth, top, shade=True)
ax.set_zmargin(0)
ax.set_zlim([0, None])
plt.show()
