matlab怎么取消科学计数法,在Matlab图的刻度标签中删除科学计数法
I have made a plot in Matlab, using:hold onplot(t1,Dx1,'r')xlabel('t (ps)')ylabel('Deviation of coordinate from initial coordinate (Å)')plot(t1,Dy1,'g')plot(t1,Dz1,'b')hold offHowever, the tick labels
I have made a plot in Matlab, using:
hold on
plot(t1,Dx1,'r')
xlabel('t (ps)')
ylabel('Deviation of coordinate from initial coordinate (Å)')
plot(t1,Dy1,'g')
plot(t1,Dz1,'b')
hold off
However, the tick labels on the y axis are generated in scientific notation:

Is there any way I can remove the scientific notation and just have the y labels range from -0.0025 to 0.0005? Thanks!
解决方案
You could try to manually set the tick labels yourself using sprintf:
yt = get(gca,'YTick');
set(gca,'YTickLabel', sprintf('%.4f|',yt))
魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐
所有评论(0)