Speeding up Plotting Lines Using the Mapping Package

9 visualizaciones (últimos 30 días)
Nick Hunn
Nick Hunn el 21 de Ag. de 2017
Editada: Chad Greene el 22 de Ag. de 2017
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

Respuestas (1)

Chad Greene
Chad Greene el 22 de Ag. de 2017
Editada: Chad Greene el 22 de Ag. de 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.

Categorías

Más información sobre Graphics Performance en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by