Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve performance for multiple plots on axes #27

Open
JimHokanson opened this issue May 30, 2020 · 1 comment
Open

Improve performance for multiple plots on axes #27

JimHokanson opened this issue May 30, 2020 · 1 comment

Comments

@JimHokanson
Copy link
Owner

For a single line this code works extremely well. However, presumably due to the listeners, if you start adding 10+ lines on the plot it gets really slow. Currently calls to plotBig create new objects with all of the associated machinery (including callbacks).

This example gets a bit slow if you zoom in then reset the plot:

n = 1e7;
t = linspace(0,1,n);
y = sin(25*(2*pi).*t) + t.*rand(1,n);
y = y';

clf
hold on
for i = 1:30
    plotBig(y,'dt',1,'t0',(i-1)*1e7)
end
hold off

To fix this there should be a plotBig object associated with the axes. New calls to the axes should add to the existing object rather than create a new object.

@JimHokanson
Copy link
Owner Author

Note this will involve removing the groupI notation, every plot should get its own x, y, and options entry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant