There appears to be a problem with the way COLORBAR limits are assigned when using a colorbar with the CONTOURF function. Typing the following for a CONTOURF plot displays a wrong color code.
colorbar
I have to create the right color code by hand. For example,
figure(1)axeshold onimagesc([0 10],[0 6000],linspace(0,1,1000)')axis([0 10 0 6000])set(gca,'layer','top','pos',[.92 .725 .03 .2],... 'box','on','ygrid','on',... 'YTick',[0 2000 4000 6000],... 'YAxisLocation','right',... 'xtick',[])title('Metres')
Is there any chance of getting colorbar to do this by itself?
Best Answer