Scatter-plot millions of points with zoom
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I'm trying to plot tens of millions of 2d points using the scatter function but it's extremely slow.
It takes several seconds to minutes to display the plot.
Once displayed, zooming and panning is tolerable but still has some latency, the other big problem is that when I'm done inspecting the plot and close the figure window, MATLAB freezes completely and it takes several minutes for MATLAB to become responsive again.
Q1: is there any way I can dump the data quicker? once i decide to close the plot I don't understand why MATLAB seizes up...
I've looked into plot (big) and similar submissions but they seem to address the problem by down-sampling the data prior to display (and then the higher resolution data is lost), or to only work with line plots, or to only work with constant-frequency time series data.
Down-sampling the entire plot doesn't work because I need the ability to zoom/pan into some smaller areas and display all of (or at least more of) the points again.
My data is not exactly constant frequency but the x-axis data is positive increasing and I could live with displaying it at constant frequency for analysis purposes.
I'm using r2018a on a PC with an i7 processor and 32GB of ram.
I've tried using tall-arrays instead which definitely helped with the "seizing up" when i close the figure but it still takes a while to display the figure, and a bigger problem is that I can't seem to use a third tall array as my colour-coding.
Error using tall/scatter>parseinput (line 87)
Argument 4 to scatter must be a non-tall array.
In short - I'm looking for a solution that does one of the following :
1) allows me to plot a Nx3 tall array, with columns 1 and 2 being my X/Y data, and column 3 being a scalar that I can use to define a colour map for the points.
2) a solution like plot(big) that downsamples the data to the pixel size, but with the ability to zoom and re-sample to the zoomed-extents, and to display points rather than lines.
4 commentaires
darova
le 15 Mai 2019
Can't you reduce points for displaying?
i = 1:1000:length(x);
scatter3(x(i),y(i),z(i))
Adam
le 17 Mai 2019
I havbe found with image data that when I look in the profiler what is taking time for my image updates applying the colourmap does seem to be quite long relatively so it may well be even more so for scatter plotted data.
Réponses (0)
Voir également
Catégories
En savoir plus sur Graphics Performance dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!