필터 지우기
필터 지우기

Fill line with colors using the heatmap

조회 수: 8 (최근 30일)
Eric
Eric 2019년 10월 2일
댓글: Eric 2019년 10월 2일
Hey everyone,
I'm currently trying to use the function:
plot
to create af figure similar to this:
Plot_How.png
Does anyone know how to use the heatmap function with the plot function?
Thanks,
Eric

채택된 답변

darova
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
img1.png
  댓글 수: 1
Eric
Eric 2019년 10월 2일
Thanks a lot! That was exactly what I needed to do!
It's much appreciated!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Distribution Plots에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by