Create a heatmap from x and y values
43 ビュー (過去 30 日間)
古いコメントを表示
Good morning,
I was hoping that someone could help me with this, I want to turn x and y coordinates into a heatmap:
I have a matrix edf_n, with edf_n.x and edf_n.y where these both have 530934 values that correspont to eye tracking data and where a participant was looking on the screen. I can plot this using a scatterplot: scatter(edf_n.x, edf_n.y) which looks like this:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1111045/image.jpeg)
However, what I want is to instead have a heatmap, instead.
Thank you very much!
Douwe
0 件のコメント
回答 (1 件)
David Hill
2022 年 8 月 29 日
t=table(edf_n.x,edf_n.y);
heatmap(t,'Var1','Var2');
3 件のコメント
Image Analyst
2022 年 8 月 29 日
You keep foregetting to attach your data, leading me to think you've never read the posting guidelines.
If you have any more questions, then attach your data and code to read it in with the paperclip icon after you read this:
参考
カテゴリ
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!