meatball1982 发表于 2022-4-1 10:06:00

豆粑粑 Matlab 设置坐标轴的颜色



引别人的帖子。设置matlab 图中坐标轴的颜色。就是一个记录。
https://www.mathworks.com/matlabcentral/answers/500983-change-axis-colour-matlab

X = 1 : 20;
Y = rand(1, 20);
subplot(2, 2, );
hold on
plot(X, Y, 'gs-');
grid on;
xlabel('UTM Easting (m)');
ylabel('UTM Northing (m)');
% Get handle to current axes.
ax = gca
% This sets background color to black
ax.Color = 'k'
ax.YColor = 'r';
darkGreen = ;
ax.XColor = darkGreen;
ax.GridColor = 'y';
ax.GridAlpha = 0.9;
ax.FontSize = 15;
ax.FontWeight = 'bold';
hold off

页: [1]
查看完整版本: 豆粑粑 Matlab 设置坐标轴的颜色