There is a \'color\' argument to Axes3D\'s bar3d function which can accept arrays to color individual bars different colors - but how would I apply a color map (i.e. cmap =
Here is my solution:
offset = dz + np.abs(dz.min())
fracs = offset.astype(float)/offset.max()
norm = colors.normalize(fracs.min(), fracs.max())
colors = cm.jet(norm(fracs))
ax.bar3d(xpos,ypos,zpos,1,1,dz, color=colors)
The first line is only required if your data goes negative.
Code adapted from here http://matplotlib.sourceforge.net/examples/pylab_examples/hist_colormapped.html.