Why mapshow is too slow in matlab r2019b?

8 views (last 30 days)
I am running the following code to make land mask with mapping toolbox ussing ghssg data
lonlims = [-120, -75]; latlims = [0, 33];
S = gshhs('gshhs_f.b', latlims, lonlims);
nvs = [S.Level];
Sn = S(nvs~=2);
Longs = cell2mat({Sn.Lon})';
Latgs = cell2mat({Sn.Lat})';
[Latgs, Longs] = maptrimp(Latgs, Longs, latlims, lonlims);
mapshow(Longs, Latgs, 'DisplayType', 'polygon', 'FaceColor', [0.5, 0.5, 0.5])
I am running the following code to make land mask, see the map.
Since matlab version 2017b the time to plot the map has been increasing continuously. For example in version 2017a it used to take no more than 3 seconds. On version 2018b takes between 5-6 seconds. On version 2019b takes more than 2000 seconds.
I made a profile for both, 2018b and 2019b, see results in images.
Any idea whats is happening?
  2 Comments
Daniel Holstein
Daniel Holstein on 17 May 2021
This question has gona a long time without an answer. I, too, am having trouble with Matlab's Mapshow. It is far faster to plot each polygon individually in a loop than to use mapshow at all.
Oliver Chikumbo
Oliver Chikumbo on 10 Mar 2023
Getting the same problem even on R2022b and it is so frustrating ... MathWorks need to respond promptly and fix this problem with mapshow

Sign in to comment.

Answers (0)

Products


Release

R2019b

Community Treasure Hunt

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

Start Hunting!