How to add label to geoscatter when havering over the datapoint

조회 수: 10 (최근 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 CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

태그

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by