- Plotting in chunks: Instead of overlaying points individually, you can accumulate a certain number of points and plot them as chunks. For example, you can collect 100 points and plot them together using ‘geoscatter’.
- Try asynchronous processing as it might be beneficial to offload data acquisition and processing tasks as separate threads or processes.
- You can also refer to geoscatter documentation for further information : Scatter chart in geographic coordinates - MATLAB geoscatter - MathWorks India
Why does geoscatter run slowly with additional points overlayed?
3 views (last 30 days)
Show older comments
I am using App Designer R2023a to build a GUI that uses geoscatter & colormap to plot 1hz data in realtime from a mobile lab. Using hold("on") each new point is overlayed on the map, and initially this works fine. But after several hundred overlays the app runs slower, takes up more RAM, and consumes more CPU power on my W10 machine. This prevents the app from completing acquisition and processing of the incoming data within the next 1000ms.
I know geoscatter can handle tens of thousands of points on a single map, but it is the overlay process that seems to bog it down after a few hundred points. Attached is the stripped down code that overlays a single point at 200ms intervals. Curiously, the time to complete the overlay function remains less than 20ms; this is displayed at the top of the map. The number of points initially plotted can be changed on line 74; using 1 or even 20000 initial points does not seem to make a difference in the number of overlays geoscatter can handle.
Using the compiled app helps only somewhat with this problem.
Is there a better way to handle these incoming points other than using hold("on")? Is there an error in the code?
Thanks, pk
0 Comments
Answers (1)
Ayush
on 25 Aug 2023
Hey Paul,
I understand that you are facing issue with App Designer GUI when using ‘geoscatter()’ and ‘colormap’ functions. Because of this app starts to slow down, consume more RAM and use more CPU power after several hundred overlays which prevents the app from data acquisition and processing within the required time frame.
Can you please provide us with the code you are mentioning about in the query?
Meanwhile, you can try out the following workarounds for the problem you are facing:
Hope this helps!!
Regards,
Ayush Goyal
See Also
Categories
Find more on Geographic Plots 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!