%% Darken a Colormap in a Subplot
% Display two surface plots using the subplot function and the summer colormap.

ax1 = subplot(1,2,1);
surf(ax1,peaks);
axis tight
ax2 = subplot(1,2,2);
surf(ax2,peaks);
axis tight
colormap(summer)

%
% Darken the summer colormap and apply it to the second surface.

newmap = brighten(summer,-.7);
colormap(ax2,newmap)

% Copyright 2012 The MathWorks, Inc.