How to define the geographic axes for multiple geoscatter data

1 回表示 (過去 30 日間)
NUR FATIN IRDINA ZULHAMIDI
NUR FATIN IRDINA ZULHAMIDI 2021 年 6 月 10 日
Hi, I have plotted two geoscatter data but the data seems not overlap. Instead of overlap it plotted on the other side of map creating two maps. How can I make the data overlap? I've tried using geolimits but it didn't work.
  2 件のコメント
KSSV
KSSV 2021 年 6 月 10 日
How did you plot the map and data?
NUR FATIN IRDINA ZULHAMIDI
NUR FATIN IRDINA ZULHAMIDI 2021 年 6 月 10 日
figure
gx = geoaxes;
lat1 = Earthquake.latitude;
lat2 = Earthquake.longitude;
EQ_location = geoscatter (lat1, lat2, 'o','filled');
hold on;
lat = SuperMAGstation.Var3;
long = SuperMAGstation.Var2;
stats = SuperMAGstation.Var1;
Station = geoscatter (gx,lat, long,'^','filled');
geolimits([-75 75],[-180 180]);
geobasemap streets;
hold off;

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

採用された回答

Max Heiken
Max Heiken 2021 年 6 月 10 日
Hello, what an interesting issue.
One solution would be to wrap one of the longitudes around using modulo:
long = mod(SuperMAGstation.Var2 + 180, 360) - 180;
assuming of course that Var2 is in degrees. Otherwise replace 180 by pi and 360 by 2*pi.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGeographic Plots についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by