extract data from heatmap

조회 수: 13 (최근 30일)
Teva Willemin
Teva Willemin 2020년 3월 19일
댓글: Adam Danz 2020년 3월 19일
hello,
i would like to transform my heatmap result into a chart of 763x855
i tried with this line of codes but the result hdata is a 703x854 chart even if i discretized the data from tbl1 (Var 2 and 3 are 0 or positive values)
[Xd,E]=discretize(tbl1.Var2,855); % discretization of X pos
[Yd,E]=discretize(tbl1.Var3,763); % discretization of Y pos
for i=1:11135;
tbl1.Var2(i)=Xd(i)/855; %replacing X pos per discret X
tbl1.Var3(i)=Yd(i)/763; %replacing Y pos per discret Y
end
h=heatmap(tbl1,'Var2','Var3'); %heatmapping eye position
hdata=h.ColorData; %creating a chart from heatmap
hdata is a 703x854 chart, not the one i requested
  댓글 수: 4
darova
darova 2020년 3월 19일
What about scatter?
scatter(tbl.Var2,tbl.Var3)
Adam Danz
Adam Danz 2020년 3월 19일
How does that image relate to a heatmap?
The dimentions of your heatmap are the same as the dimentions of the input data regardless of how it's discretized. If you want to plot scatter points, heatmap isn't what you want, anyway. As darova said, use plot() or scatter().

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

답변 (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