I am trying to create a tabbed figure where each of the two tabs has a different viewshed plotted on terrain using the mapping toolbox. I am able to create the tabbed figure, but I am unable to figure out how to use a different colormap on each tab. With the code below both of the tabs are using the colormap from the first tab (summer(2)). I've also been able to get both tabs to take on the colormap from the second tab (flipud(summer(2)) by not setting h1=axesm for the first tab and not setting h2=axesm for the second tab. Is there a way to set a different colormap for each tab of the figure?
figure(1);tg=uitabgroup();thistab=uitab(tg,'title','Terrain');axes('Parent',thistab)h1=axesm('globe','geoid',1.7365E+06);meshm(viewshed,refmat,size(Z), Z); axis tightcamposm(0,90,1e4)camupm(90,0)colormap(h1, summer(2))shading interpcamlighttitle('Terrain');thistab=uitab(tg,'title','Visibility');axes('Parent',thistab)h2=axesm('globe','geoid',1.7365E+06);hold on;meshm(viewshed2,refmat,size(Z),Z);axis tightcamposm(0,90,1e4)camupm(90,0)colormap(h2, flipud(summer(2)))shading interpcamlighttitle('Visibility 1');
Additional info: I'm running this code from app designer. Since mapping toolbox axes aren't well supported for UIAxes I'm trying to use tabbed figures to organize all the mapping toolbox based plots generated by my app.
Thank you in advance for the help!
Best Answer