How can I label each colorbar axis from a list, using subplot axis inside a for loop?
1 次查看(过去 30 天)
显示 更早的评论
I want to label each colorbar axis using a list l inside the for loop. Is there any way I can make it? Thanks.
[ha, pos]= tight_subplot(1,5,[.09 .085],[.165 .02],[.1 .045]);
for jj=1:5
axes(ha(jj));
l={'m12','m23','m13','m32', 'm33'};
x=load(sprintf('m%d1.dat',jj));
x1=scatter(x(:,2),x(:,3),[],x(:,4),'filled');
hold on
set(gca,'Fontsize',34,'LineWidth',2.0,'TickDir','in')
set(gca,'XMinorTick','on','YMinorTick','on')
set(gca,'XMinorTick','on','YMinorTick','on','Box','on')
set(gca,'TickLength',[0.04, 0.01])
c = colorbar;
set(c,'FontSize',40)
c.Label.String =('$\rm{D_{a_{l{jj}}}}$');
c.Label.Interpreter = 'latex';
caxis([min(x(:,4)) 1]);
% caxis auto
xlabel('A_{{m}}');
end
ylabel('M_{{m}}')
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Colormaps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!