You can try something like this:
imagesc
axP = get(gca,'position');
axCB = axes('position',[axP(1)+axP(3)+ 0.005 axP(2),0.03 axP(4)]);
X = logspace(0,log10(2^11),101)';
pcolor([1 2],X,log10([X,X]))
set(gca,'yscale','log')
shading flat
set(gca,...
'yaxisLocation','right','ytick',[1:9,10:10:90,100:100:1000 2048],...
'yticklabel',{'1','','','','','','','','',...
'10','','','','','','','','',...
'100','','','','','','','','',...
'1000','2048'},...
'tickdir','out',...
'box','off',...
'xtick',[])
You might have to doodle a bit with the position of the main axes and the colorbar-axes to get the best layout for your case, and select a suitable colormap.
HTH
Best Answer