Hi, very nice contribution.
I had a problem using the code in a gui environment. The problem is, that the current axis is not always that axis which is used for plotting, if you define an axis property in the plot command. You may than use freezeColors(axis_handle). But the caxis command in the code does not use that axis_handle. Therefor I changed in line 86: cax=caxis to cax=caxis(h). Than everything works fine.