在图形统计中涉及到的坐标轴转化问题,如对数坐标轴的转化,我们用到了loglog(Y),semilogx(Y),semilogy(Y)函数,对双坐标轴的对数坐标转化和对x,或y单坐标轴的坐标转化
对双坐标轴转化:
subplot(2,2,2);
plot(y);
loglog(y);
对y轴转化:
subplot(2,2,3);
plot(y);
semilogy(y);
对x坐标轴的转化:
subplot(2,2,4);
plot(y);
semilogx(y);
x=logspace(-1,1);
y=x.^2;
subplot(2,2,1);%subplot声明一遍再用plot画
plot(y);
title('plot');
subplot(2,2,2);
plot(y);
loglog(y);
subplot(2,2,3);
plot(y);
semilogy(y);
subplot(2,2,4);
plot(y);
semilogx(y);p