有人请告诉我如何改变坐标轴的颜色。当我运行下面的代码时,我会以黑色的颜色显示轴上的时间和振幅值,这是默认值。我想改变它的颜色。我设法改变了标签的颜色。在Matlab中,如何更改轴的颜色?
dt = 0:0.2:50;
y = 2*pi*sin(dt);
subplot(211)
plot(dt,y,'r');
grid on
xlabel('Time','color','r')
ylabel('Amplitude','color','r')
z=pi*cos(dt);
subplot(212)
plot(dt,z,'g')
grid on
xlabel('Time','color','g')
ylabel('Amplitude','color','g')
你读过[轴属性](https://se.mathworks.com/help/matlab/ref /axes-properties.html)? –