Unexpected result from wmline command
1 回表示 (過去 30 日間)
古いコメントを表示
Nachiket Wadwankar
2021 年 6 月 2 日
コメント済み: Nachiket Wadwankar
2021 年 6 月 6 日
Hello,
I want to plot a line connecting latitude and longitudes on map using wmline command. When I use the command i get and extra straight line connecting the start and end co-ordinates. How to avoid that line?
Regards,
Nachiket
0 件のコメント
採用された回答
Walter Roberson
2021 年 6 月 2 日
That does not happen in my tests, such as
cities = shaperead('worldcities.shp', 'UseGeoCoords', true, ...
'Selector', ...
{@(v)(ismember(v, {'London', 'Paris', 'Berlin'})), 'Name'});
lat = [cities.Lat];
lon = [cities.Lon];
wmline(lat,lon)
That suggests that your first and last lat and lon are the same.
3 件のコメント
Walter Roberson
2021 年 6 月 2 日
Duplicate coordinates.
I recommend plotting your latitude and longitude individually; you will see a big jump half way through.
>> [Longitude([1, end/2]),Latitude([1, end/2])]
ans =
-90.402756 40.9385799
-90.402756 40.9385799
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Legend についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!