xlabel 입력 안됨

3 views (last 30 days)
만재 고
만재 고 on 31 May 2022
Answered: Ayush on 6 Sep 2023
그림을 그릴때 xlabel 명령어가 읽히지 않습니다. 어떻게 하면 되나요??
코드
figure('Name','Wind Parameters Plot Window ','NumberTitle','off');
[AX,H1,H2] = plotyy(Dn,WS,Dn,WD,'plot'); grid on
datetick2('x','mm/dd',AX(1)); datetick2('x','mm/dd',AX(2));hold on
set(get(AX(1),'Ylabel'),'String','{\bf\itWind speed (m/s)}','FontName','Times','fontsize',25)
set(get(AX(2),'Ylabel'),'String','{\bf\itWind direction (deg.)}','FontName','Times','fontsize',25)
axis(AX(1),[Dn(1) Dn(end) 0 20]); set(H1,'LineStyle','-','linewidth',1)
axis(AX(2),[Dn(1) Dn(end) 0 360]); %set(H2,'LineStyle','o','linewidth',1.5,...
%'color','k','markersize',5)
set(H2,'marker','o','LineStyle','none',...
'color','k','markersize',5)
xlabel(Xname,'FontName','Times','fontweight','bold','fontangle','italic','fontsize',27); 이 부분이 입력이 안됩니다.
[ID,KH] = AutoInt_1Hr(Dn);
set(AX(1),'fontsize',17,'position',[.065 .12 .86 .80],...
'xtick',Dn(ID),'xticklabel',datestr(Dn(ID),KH),'ticklength',[.005 .005],...
'FontName','Times','YColor','b','yzhemtick',[0:4:1000],...
'FontName','Times','xgrid','off')
set(AX(2),'fontsize',17,'position',[.065 .12 .86 .80],...
'xtick',Dn(ID),'xticklabel',datestr(Dn(ID),KH),'ticklength',[.005 .005],...
'FontName','Times','YColor','k','ytick',[0:90:360],'FontName','Times','xgrid','off')
clear AX H1 H2 ID
text(Dn(1),380,['Wind(' ST ' AWS)'],'fontsize',30,...
'fontweight','bold','fontangle','italic','color','k','FontName','Times');
set(gcf,'color','w','position',[10 10 1000 500],'PaperPositionMode','manual', ...
'PaperUnits', 'centimeters','paperposition',[0 0 30 15]);
print('-depsc2','-tiff','-r300',['../Figure/' ST '_Wind.eps']);
print('-djpeg','-r300',['../Figure/' ST '_Wind.jpg']);

Answers (1)

Ayush
Ayush on 6 Sep 2023
이 답변은 가능한 가장 빠른 응답을 제공하기 위해 영어로 되어 있습니다
Kindly provide some more data like full .M and .MAT file so that issue can be reproduced. I am using MATLAB R2023a and for me the "xlabel" is working fine.
To learn more about how to use the "xlabel" kinldy view the following documentation:
Thank you.

Categories

Find more on 2차원 플롯과 3차원 플롯 in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!