我想让每个子图共享相同的颜色条比例。我知道适用于大于 1 的整数,但使用0.001 等值caxis
似乎存在问题。caxis
x = 0:1:10;
y = 0:1:10;
z1 = .1:-.01:0;
z2 = .01:-.001:0;
figure;
subplot(1,2,1);
scatter(x,y,10,z1); colorbar;
subplot(1,2,2);
scatter(x,y,10,z2); colorbar;
现在我想让散点图有一个共同的颜色条比例。我尝试使用caxis
,但是我没有得到想要的结果。左轴无法正确缩放,因为它们都是棕色的。如何纠正?
ca = [0 .01];
figure;
subplot(1,2,1);
scatter(x,y,10,z1); caxis(ca); colorbar;
subplot(1,2,2);
scatter(x,y,10,z2); caxis(ca); colorbar;