Rendering for big matlab figure is slow

I am using MatLab R2014B for Win 8.1. I have a figure with two subheadings. The data for the first subheading is about 700,000 items; the second - about 50,000 points. When I show it or manipulate it in some way (zoom, say), there is a huge lag, up to about 30 seconds. Obviously I would like to improve performance. Here's what I know:

  • If I split it into 4 chunks, each covering 1/4 of the data, the performance is fast. Much more than 4 times faster. The difference seems to be exponential.
  • A colleague (running R2014A in my opinion) has a car that should be slower, but in fact the figure is displayed at almost real time speed.

The problem is probably how the shape is rendered. I ran MatLab "opengl info" and it says the Software flag is false. This should mean its using hardware display rendering.

So it is possible that the display adapter is not installed perfectly correctly. My machine (this is a Lenovo laptop) has two display adapters: Intel HD Graphics 3000 and NVIDIA NVS 4200M. I don't know why there are any relevant settings either.

Any thoughts on how to proceed?

+3


source to share


4 answers


MATLAB has been released since R2014b uses a new graphics engine known to be extremely slow with large datasets; see for example http://www.mathworks.com/matlabcentral/newsreader/view_thread/337755



The solution has nothing to do with graphics drivers, etc. Go back to MATLAB R2014a and stay there.

+1


source


You may be using it through an integrated GPU (Intel HD Graphics 3000) and not a dedicated GPU (NVIDIA NVS 4200M). If your Lenovo has "switchable graphics" you should be able to switch to NVIDIA or check if you are actually doing it. Right click on your power manager in the taskbar. If you see a menu item that says "switchable graphics", you can change it to your NVIDIA. Please note, you need to close MATLAB to switch.



It looks like the slowdown caused by the render config. When you run opengl info

MATLAB, which device is listed as "Renderer"?

0


source


If you don't need to manipulate it (let's say you only want an image file), you can always create your shape with figure('Visible','Off')

and save it without actually showing the shape on screen.

0


source


I wrote a plotECG function that allows you to display graphs with millions of samples. It includes sliders for fast scrolling and zooming.

If you have multiple time series and want them to be displayed synchronously, you can pass them as a matrix at once and define the "AutoStackSignals" key followed by a cell array of strings with the signal names. The signals are then displayed one below the other on the same axis with the corresponding name YTickLabel.

https://de.mathworks.com/matlabcentral/fileexchange/59296

0


source







All Articles