MATLAB: Making two different color maps in 2014b

colorbarscolormapsfreezecolorsMATLABplottingr2014bgraphics

I'm trying to figure out how to use two different color maps in 2014b and use multiple color bars. Specifically I want to plot some image data and on top of that plot a set of contours.
Basically in the past I used freezecolors and cbfreeze. The same method behind freezecolors still works, changing the CData of your image to RGB values, but the colorbar is still a problem. CBfreeze doesn't seem to work any more because the colorbar objects are no long structs and now are specific objects.
I want to have separate colorbars for both the image data and contours but I can't seem to figure out the issue with the colorbars.
Thanks,
John

Best Answer

You can still use the freezecolors approach or one like I use in my meshCanopy function (same idea). You'll need to set the 'Limits' property of the colorbar to the range you want (and perhaps the tick/ticklabel etc.). For example:
I = imread('cameraman.tif');
n = 64;
meshCanopy(I,stdfilt(I),parula(n),80);
h = colorbar;
%%Now compare
h.Limits = [256 256+n];