请教一下matlab​作图为什么不用科学计​数法显示了。

我修改了一个坐标显示的数据,matlab作图之后y坐标的显示就变成不是科学计数法的显示了,想请教一下为什么,谢谢!
修改前:
axis([-5,350,1e-1,1e5])
set(axes1,'FontName','Times New Roman','FontSize',14,'XMinorTick','on',...
'XTick',[1 49 97 145 193 241 289 337],'XTickLabel',...
{'3/12 00:00','3/14 00:00','3/16 00:00','3/18 00:00','3/20 00:00','3/22 00:00','3/24 00:00','3/26 00:00'},...
'YMinorTick','on','YTick',[1e-1 1e0 1e1 1e2 1e3 1e4 1e5],'YScale','log');
修改后:
axis([-5,350,4e-1,1e5])
set(axes1,'FontName','Times New Roman','FontSize',14,'XMinorTick','on',...
'XTick',[1 49 97 145 193 241 289 337],'XTickLabel',...
{'3/12 00:00','3/14 00:00','3/16 00:00','3/18 00:00','3/20 00:00','3/22 00:00','3/24 00:00','3/26 00:00'},...
'YMinorTick','on','YTick',[4e-1 1e0 1e1 1e2 1e3 1e4 1e5],'YScale','log');
将1e-1修改成了4e-1

 Akzeptierte Antwort

segwexv
segwexv am 25 Mai 2023

0 Stimmen

会用XTickLabel,为啥不会用YTickLabel呢?
或者使用yticklabels函数

Weitere Antworten (0)

Kategorien

Mehr zu 二维图和三维图 finden Sie in Hilfe-Center und File Exchange

Tags

Gefragt:

am 25 Mai 2023

Beantwortet:

am 25 Mai 2023

Community Treasure Hunt

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

Start Hunting!