Skip to content

Improve performance for multiple plots on axes #27

@JimHokanson

Description

@JimHokanson

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions