필터 지우기
필터 지우기

how to give equally align ylabel in subplot loop

조회 수: 5 (최근 30일)
amrinder
amrinder 2013년 6월 4일
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