gpt4 book ai didi

渐变颜色的matlab contourf

转载 作者:行者123 更新时间:2023-12-01 06:13:41 26 4
gpt4 key购买 nike

friend 们,

我有一个图像矩阵并使用

创建了下图
contourf(my_matrix)
colorbar

enter image description here

是否可以让轮廓线之间的颜色逐渐变化,而不是用纯色填充这些空间?

非常感谢您的帮助。

最佳答案

Cinico 的解决方案对我不起作用。这是我使用的:

% Set Data
data = (1:100)'*(1:100);

figure;
subplot(1,2,1)
% Binned Color
contourf(data);
subplot(1,2,2)
% Gradual Color
pcolor(data);
hold on;
shading interp;
contour(data,'LineColor','k')

输出:

enter image description here

关于渐变颜色的matlab contourf,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15511263/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com