It works just fine, however the colorbar I'm getting with the following
commands is very tiny.
norm = matplotlib.colors.Normalize(vmin=x[0], vmax=x[-1]) # just an example
cb = matplotlib.colorbar.ColorbarBase(ax, cmap=matplotlib.cm.jet, norm=norm)
It would help to give a complete example. ColorbarBase itself does not
create a colorbar but is useful for drawing a colorbar in existing axes.