How to create a heatmap from recorded positions
9 ビュー (過去 30 日間)
古いコメントを表示
Dear all,
Im trying to create a distribution map (or heatmap) from a table that represents ships positions (see figure).
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/731874/image.png)
Based on the previous figure, I would like to transform that into a heatmap. How can I do it.
Thanks in advance
0 件のコメント
採用された回答
Dave B
2021 年 9 月 8 日
I'm not sure if you're asking about collapsing the trajectories to a single value per ship, or just displaying a binned version of the scatter? If it's the latter, binscatter (or histogram2) might solve this problem.
x=randn(1000,1);
y=x+randn(1000,1)/3;
nexttile;scatter(x,y,'.');title('scatter')
nexttile;binscatter(x,y);title('binscatter')
nexttile;histogram2(x,y,'DisplayStyle','tile');title('histogram2')
c=colorbar;
c.Label.String='Count';
その他の回答 (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!