MATLAB绘图坐标值改为科学计数表示


纵坐标表示为指数方法1

x = linspace(0,5,1000);
y = 100*exp(x).*sin(20*x);
plot(x,y)
ax = gca;
ax.YAxis.Exponent = 4;%常数4为指数值,即表示1.4*10^4

纵坐标表示为指数方法2

x = linspace(0,5,1000);
y = 100*exp(x).*sin(20*x);
plot(x,y)
ax = gca;
ax.YAxis.Exponent = 0;
ytickformat('%.1e')%包含一位小数,如1.4*10^2

 

 

相关