File Exchange

image thumbnail


version 1.6 (1.63 MB) by Jim Hokanson
Plot large amounts of line data quickly


Updated 30 May 2020

From GitHub

View Version History

View license on GitHub

This code plots large amounts of line data quickly by only plotting a subset of the data at any given time.

More info can be found at these posts:

Cite As

Jim Hokanson (2021). JimHokanson/plotBig_Matlab (, GitHub. Retrieved .

Comments and Ratings (15)

Hossam Hassan

Marcel Goldschen-Ohm

Despite improvements in plot performance in R2020a, this still performs better for really large time series! Kudos.

Marius Bauza

Jim Hokanson

@Michal I'm currently working on updating the code to do exactly that. It has just been a very busy summer. Thanks.

Michal Kvasnicka

Once again thanks for this code!!! But I propose to solve problem with old CPU's in some universal way. I have the same problem with my old laptop (Intel CPU from 2009).

Jim Hokanson

Thanks Peter. To everyone else, the issue was that Peter was using an older processor and my code wasn't properly handling the SIMD calls for his processor. I've sent Peter a quick fix which compiles the code for his processor. It still needs a bit of polishing. Eventually my intention is to have processor specific mex files available for download. If your processor is from late 2011 or newer you shouldn't be impacted ... As always, if you run into problems feel free to post here, email me, or to open up an issue on GitHub.

Peter Antal

This code is lightning fast! Thank you, Jim!

Jim Hokanson


This code should work great for data on the order of 1E8 data points. Once the data array is sufficiently small the mex code is not called, which is why you are avoiding the error. Please email me with details regarding your operating system, processor model (be specific, e.g. Intel i5-3570), and ideally a code snippet that can reproduce the error and I will debug it. My lab has been using this code for a few years now without issues but it is possible that you've managed to find a bug. I recently ran across a processor compatibility issue with another project that I might need to handle for this one as well.

Peter Antal

I downloaded the package by the FileExchange "Download from GitHub" button today. I tried it with Matlab R2018b Update 4.
It crashed Matlab with 1E4 data points with a Matlab error window "Matlab has encountered an internal problem and needs to close" (Error code "MathWorks::System::FatalException"). With 1E3 points, it did not crash, however. Have you tested the package with this version of Matlab. What can be the problem?
Actually, I would like to use it with 1E7-1E8 data points.

Jim Hokanson


Thanks for pushing me to update the compile instructions for Linux and Windows. I finally got around to fixing a fairly small bug with endpoints so I wanted to reply to your comment. I think the code is perfectly fine for people to use and multiple people in my lab use it routinely with no problem. I'm updating the image associated with this page to reflect time differences between this library, Matlab, and another library on the FEX (40790-plot-big).

Michal Kvasnicka

Extremely interesting toolbox with significant plotting speed up for big data!!!

But, the project is actively maintained on GitHub (definitely not here), and it is still too premature for routine, reliable and robust use.

Michal Kvasnicka

How to compile mex files for Linux and Windows??? Please add more detailed instructions.

Jim Hokanson

@WM My apologies on the delay. You probably already know the answer by now ... but for the record the answer is no.


Hi, I want to know that if your program can plot a lot of discrete points or not?
Thank you very much for your reply.

Jim Hokanson

I just found out that included mex files dynamically link to the openmp library, rather than statically. I hope to update this soon so that everything just works out of the box.

MATLAB Release Compatibility
Created with R2014a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Inspired by: Plot (Big)

Community Treasure Hunt

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

Start Hunting!