Speeding up Plotting Lines Using the Mapping Package
9 views (last 30 days)
Show older comments
Hi, I've got a bunch of GPS data from runs of a car and want to plot it nicely on a map with delays between each point. I've tried using wmline in a loop plotting it piecewise, but it's very slow and hangs after plotting a few hundred points. Does anyone have any suggestions on speeding it up?
Plotting it as points also works as there's enough data for that to work but I don't want the big markers from the wmmarker command though the additional data would be useful (I've also got velocity, speed, heading, etc.). My mapping code is below:
for(i=2:size(lat,1))
wmline([lat(i-1,1)/10^7,lat(i,1)/10^7],[long(i-1,1)/10^7,long(i,1)/10^7]);
pause(0.1);
end
0 Comments
Answers (1)
Chad Greene
on 22 Aug 2017
Edited: Chad Greene
on 22 Aug 2017
Why use a loop? You should be able to do
wmline(lat*1e-7,long*1e-7)
without any loops at all. If you must use a loop, you can speed it up by removing that 0.1 second pause each time through the loop.
0 Comments
See Also
Categories
Find more on Graphics Performance in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!