how to give equally align ylabel in subplot loop

5 次查看(过去 30 天)
This is one script to create subplots of some technique.
figure('Color',[1 1 1]) for i = 1:8
pp=subplot(8,1,i);
ax=get(pp,'Position');
ax(2)=ax(2)+0.015; %or wathever
set(pp,'Position',ax);
plot(t(1:n),imf(i,:)) %%t(1:n) and imf(i,:) is being created in previous script which is not described
set(gca,'ytick',[])
set(gca,'xticklabel',[])
set(gca,'ytickMode','auto','Fontname','Times new roman','FontSize',16,'fontweight','b')
set(gca,'xtickMode','auto')
set(gca,'XMinorTick','on','YMinorTick','off')
xlim ([0 6.4])
y_titre=sprintf('C%d',i);
ylabel(y_titre,'Fontname','Times new roman','FontSize',16,'fontweight','b')
end
set(gca,'xticklabel',[0:1:6.4],'Fontname','Times new roman','FontSize',16,'fontweight','b')
xlabel('Time(s)','Fontname','Times new roman','FontSize',24,'fontweight','b')
The result is shown at this link . http://i43.tinypic.com/9ptdp2.jpg
Now everything runs fine until this small problem in which IMF1 and IMF2 are not aligned with remaining IMFs.(click on above link to see the problem) Kindly help me to solve this problem so that everything on ylabel (such as IMF1, IMF2, IMF3, IMF4 etc.) are equally aligned.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by