In Mapping Toolbox, axesm doesn’t create a new axes (it modifies the current axes), so the handles to the first and second call to axesm are the same axes.
The second colormap overwrites the first one.
In order to have two asexm with different colormaps, a new axes needs to be created for the second map axes
For example,
hAxesJ = axesm('MapProjection','mercator',...
'Frame','on',...
'Grid','on',...
'GColor','k',...
'MapLatLimit',[25 75],...
'MapLonLimit',[-100 20],...
'ParallelLabel','on',...
'MeridianLabel','on',...
'FontSize',10);
colormap(hAxesJ,winter);
hAxesS = axes;
axis(hAxesS,'off')
axes(hAxesS)
hAxesd = axesm('MapProjection','mercator',...
'Frame','on',...
'Grid','on',...
'GColor','k',...
'MapLatLimit',[25 75],...
'MapLonLimit',[-100 20],...
'ParallelLabel','on',...
'MeridianLabel','on',...
'FontSize',10);
cbS = colorbar(hAxesd,'Location','east');
colormap(hAxesd,spring);
Best Answer