Plotting very large data freeze MATLAB

10 visualizaciones (últimos 30 días)
Abhishek Saini
Abhishek Saini el 14 de Dic. de 2018
Comentada: Walter Roberson el 14 de Dic. de 2018
I have large array 3D data and when I am plotting it using plot and plot3 function MATLAB freezes. Is there any option to create it in leass memory storage
  5 comentarios
KSSV
KSSV el 14 de Dic. de 2018
YOu must be having nodal connectvity matrix.......use trisurf. It will be fast.
Abhishek Saini
Abhishek Saini el 14 de Dic. de 2018
I dont have the Z matrix for that. I want to plot mesh only i.e. X,Y,Z with scatter points. I used scatter 3 and plot 3. But it freezes.

Iniciar sesión para comentar.

Respuestas (1)

Walter Roberson
Walter Roberson el 14 de Dic. de 2018
No not really . In current MATLAB the graphics data is sent to another thread for rendering , and the renderer may have to send it to graphics primitives that might hold onto the data (especially 3d since you can get big performance improvements by transmitting data once and then sending rotation information ). So any data will end up being promoted from sparse to full if needed , and will end up being duplicated perhaps more than once. The only space saving that can matter heading through the pipeline is single precision .
Beyond that. .send less data to be plotted . For example if you know some points are going to be hidden then it might be worth not plotting them . Don't worry too much about it if it is complicated to figure out, as the graphics hardware can figure it out more efficiently , but don't be wasteful either And remember that sending data that is denser than the display resolution is probably a waste unless you are deliberately trying to be extremely realistic ...
  2 comentarios
Abhishek Saini
Abhishek Saini el 14 de Dic. de 2018
Thanks for your answer. I agree with your point. Is it possible to do with some external software or programming language?
Walter Roberson
Walter Roberson el 14 de Dic. de 2018
I have a relatively large display, 2560 x 1440 . Not the largest available, but yours is probably not much larger.
2560 x 1440 = 3686400 .
243528000 / 3686400 = 66.061
So your data is about 66 times larger than can possibly be represented on my display. You would need an array of 8 of my monitors per side to have each pixel of your data show up once.
It is therefore a complete waste to attempt to plot all of the data you have. You should subsample it.
Since it is a 3D finite element mesh, it is probably equally spaced along some directions. You could probably use indexing to choose representative points to plot. You could probably do pixel averaging if you are concerned about every 8th pixel not being representative enough.
If your points are not equally spaced (such as could happen for deformation studies) then you can use griddedInterpolant or scatteredInterpolant to calculate values over a grid no larger than your display.
Remember, it is not required that you plot everything at the same time. It is valid to hook into the zoom callbacks to extract subsets of data according to the current axes limits, and to sub-sample according to display resolution.

Iniciar sesión para comentar.

Categorías

Más información sobre Scatter Plots 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