Currently when adding a colorbar histogram we try to extract the zmin and zmax values, which doesn't work in certain instances. It would be better to extract the values from the most recently used PyGMT cpt instance.
This would allow create a cpt with pygmt.makecpt but not having to save it to a file, then passing cmap=True to the plotting functions.