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

21 vues (au cours des 30 derniers jours)
sekvstnc
sekvstnc le 25 Mai 2023
我修改了一个坐标显示的数据,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

Réponse acceptée

segwexv
segwexv le 25 Mai 2023
会用XTickLabel,为啥不会用YTickLabel呢?
或者使用yticklabels函数

Plus de réponses (0)

Catégories

En savoir plus sur 二维图和三维图 dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!