Fill line with colors using the heatmap
8 ビュー (過去 30 日間)
古いコメントを表示
Hey everyone,
I'm currently trying to use the function:
plot
to create af figure similar to this:
Does anyone know how to use the heatmap function with the plot function?
Thanks,
Eric
0 件のコメント
採用された回答
darova
2019 年 10 月 2 日
What about pcolor()
clc,clear
n = 50;
x = linspace(-5,5,n);
[X,Y] = meshgrid(x);
for i = 1:n
y = sinc(x(i))+0.5;
Y(:,i) = linspace(0,y,n);
end
Z = Y;
h = pcolor(X,Y,Z);
% set(h,'edgecolor','none')
shading interp
colorbar
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Data Distribution Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!