How to add label to geoscatter when havering over the datapoint

3 ビュー (過去 30 日間)
Ferry Nieuwland
Ferry Nieuwland 2022 年 9 月 10 日
コメント済み: Ferry Nieuwland 2022 年 10 月 11 日
Hello Community,
Below a very simple script that plots tsunamis on a map. When you hoover over a datapoint you only see the Latitude and Longitide. How can I add i.e. the Contry to this label when moving the mouse over the point? I don't want to plot up all the countries; that would make the plot too busy. I only want to see the country when going with the mouse over the point. How can I display this information. Any thoughts?
tsunamis = readtable('tsunamis.xlsx');
geoscatter(tsunamis.Latitude,tsunamis.Longitude)
Thanks,
Ferry

採用された回答

Vishesh
Vishesh 2022 年 10 月 6 日
  • Please refer to this MATLAB Answer : Plot and Hover
  • Make a list of country name corresponding to there latitude and longitude by yourself.
  • Make some changes in the above MATLAB Answer code accordingly.
  1 件のコメント
Ferry Nieuwland
Ferry Nieuwland 2022 年 10 月 11 日
Hello,
Thanks for pointing me to these scripts. That helped and solved my question. Much appreciated.
Kind Regards,
Ferry

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

タグ

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by