Hi again.
I have been working on a GUI that creates a contour depending on certain slider values.
I have elevated a specific isoline in the contour by marking it black.
Is it possible to elevate the corresponding position on the colorbar? I have uploaded two images. The first one shows the contour as it is, the second one shows it as I would like it to be, with the colorbar elevation added manually by hand:
as I would like it to be: http://s1329.photobucket.com/user/mrcjkb89/media/Capture2_zps08df0db3.jpg.html
Here is the code for my contour (p_nb is the value of the elevated isoline):
contour(handles.SKosten,x1,x1,p_sk,'LevelStep',2,'Fill','on')hold oncontour(handles.SKosten,x1,x1,p_sk, [p_nb p_nb], 'Color','k','LineWidth',1.45)
And here's the code for the colormap:
b = [.091 .153 0;... .114 .159 0;... .137 .166 .001;... .160 .172 .001;... .184 .178 .001;... .207 .184 .001;... .230 .191 .002;... .253 .197 .002;... .253 .181 .003;... .253 .166 .005;... .253 .150 .006;... .254 .134 .007;... .254 .118 .008;... .254 .103 .010;... .254 .087 .011];b = b*1000;b = b/255;caxis([20 50]);cmp = colormap(b);cbr = colorbar;set(cbr,'YTick',20:2:50,'FontSize',9)
b actually changes with a switch (depending on the value of p_nb), so that the inside of the elevated isoline is always green and the outside always yellow/red. I think it would be too much to post the whole thing here, but knowing that could be relevant..
Thanks in advance!
Marc
Best Answer