Speeding up Plotting Lines Using the Mapping Package
3 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Chad Greene
2017-8-22
编辑:Chad Greene
2017-8-22
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Graphics Performance 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!