Mathematica中文论坛-非官方
标题:
豆粑粑 Matlab 设置坐标轴的颜色
[打印本页]
作者:
meatball1982
时间:
2022-4-1 10:06
标题:
豆粑粑 Matlab 设置坐标轴的颜色
引别人的帖子。设置matlab 图中坐标轴的颜色。就是一个记录。
https://www.mathworks.com/matlab ... -axis-colour-matlab
X = 1 : 20;
Y = rand(1, 20);
subplot(2, 2, [1 3]);
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 = [0, 0.6, 0];
ax.XColor = darkGreen;
ax.GridColor = 'y';
ax.GridAlpha = 0.9;
ax.FontSize = 15;
ax.FontWeight = 'bold';
hold off
复制代码
欢迎光临 Mathematica中文论坛-非官方 (http://ilovemathematica.com/)
Powered by Discuz! X3.2