Multiple text entries over plots
Ältere Kommentare anzeigen
Dear all
Currently, I am plotting the following:
u1=figure('visible','off','units','pixels','position',[0 0 1920 1080]);
t=tiledlayout("vertical");
title(t,strcat(['Exfoliated hexalayer. First layer. LLG-Heun, $t=\, \,$',num2str(time(m)),'',time_text{m},', $\alpha=\, \,$',num2str(damping(1)),'. $T=\, \,$',num2str(round(temperature(m),2)),' K, $\mathbf{H}=0$';'';'']),'FontSize',18,'interpreter','latex');
nexttile;
uimagesc(space_x,space_y,mx_1(:,:,m));
hold on
plot(geometry_tetra(:,1),geometry_tetra(:,2),'-k','LineWidth',0.5);
plot(geometry_penta(:,1),geometry_penta(:,2),'-k','LineWidth',0.5);
plot(geometry_hexa(:,1),geometry_hexa(:,2),'-k','LineWidth',0.5);
hold off
axis xy;
clim([-1 1]);
colormap(bluewhitered(256));
box on;
xlim([0 x]);
xticks([0:50:200]);
ylim([0 y]);
yticks([0:19:95]);
pbaspect([x/y 1 1]);
xtickangle(0);
set(gca,'TickLabelInterpreter','latex','FontSize',18);
t1=title(['$m_a$'],'FontSize',20,'interpreter','latex');
set(t1,'interpreter','latex','FontSize',20);
set(gca,'XTickLabel',[]);
yticks([0:19:95]);
nexttile;
uimagesc(space_x,space_y,my_1(:,:,m));
hold on
plot(geometry_tetra(:,1),geometry_tetra(:,2),'-k','LineWidth',0.5);
plot(geometry_penta(:,1),geometry_penta(:,2),'-k','LineWidth',0.5);
plot(geometry_hexa(:,1),geometry_hexa(:,2),'-k','LineWidth',0.5);
hold off
clim([-1 1]);
colormap(bluewhitered(256));
axis xy;
box on;
clr2=colorbar;
set(clr2,'TickLabelInterpreter','latex');
ylabel(t,'$b$-{\it th} spatial direction, $b \, \, \left( \mathrm{nm} \right)$','FontSize',18,'interpreter','latex');
ylabel(clr2,'$i$-{\it th} magnetization component, $m_i$','Interpreter','Latex','FontSize',19);
clr2.Layout.Tile='east';
xlim([0 x]);
xticks([0:50:200]);
ylim([0 y]);
yticks([0:19:95]);
pbaspect([x/y 1 1]);
xtickangle(0);
set(gca,'TickLabelInterpreter','latex','FontSize',18);
t2=title(['$m_b$'],'FontSize',20,'interpreter','latex');
set(t2,'interpreter','latex','FontSize',20);
set(gca,'XTickLabel',[]);
yticks([0:19:95]);
nexttile;
uimagesc(space_x,space_y,mz_1(:,:,m));
hold on
plot(geometry_tetra(:,1),geometry_tetra(:,2),'-k','LineWidth',0.5);
plot(geometry_penta(:,1),geometry_penta(:,2),'-k','LineWidth',0.5);
plot(geometry_hexa(:,1),geometry_hexa(:,2),'-k','LineWidth',0.5);
hold off
box on;
axis xy;
clim([-1 1]);
colormap(bluewhitered(256));
xlabel('$a$-{\it th} spatial direction, $a \, \, \left( \mathrm{nm} \right)$','FontSize',18,'interpreter','latex');
xlim([0 x]);
xticks([0:50:200]);
ylim([0 y]);
yticks([0:19:95]);
pbaspect([x/y 1 1]);
xtickangle(0);
set(gca,'TickLabelInterpreter','latex','FontSize',18);
t3=title(['$m_z$'],'FontSize',20,'interpreter','latex');
set(t3,'interpreter','latex','FontSize',20);
yticks([0:19:95]);
set(gcf,'color','white');
set(gca,'Units','normalized');
set(u1,'Units','Inches');
posu1=get(u1,'Position');
set(u1,'PaperPositionMode','Auto','PaperUnits','Inches','PaperSize',[posu1(3),posu1(4)]);
which gives:

I need to add some text entries, in LaTeX format, in such a way that the figure looks like:

Is there any good strategy to select the position of the 4L, 5L, and 6L so the text entries are more less centered within the definition region?
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Labels and Annotations finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
