Skip to content

when data is larger than plot has room for... #1

@dlluch

Description

@dlluch

lines ~273-281 of stripchart... I added a little snippet to handle when the requested data to plaoit is larger than the strip chart width (resulting in negative index in the original code)... this simply plots as much as fits, and moves on...

if NLines==1 %Special case for one line only
if numel(yData) < newPts % this means more data is in buffer than fits on plot - trim it
yData(1:end) = data(end-numel(yData),end);
else
yData(1:end-newPts) = yData(newPts+1:end); % shift old data left
yData(end-newPts+1:end) = data; % new data goes on right
end
set(hLine,'YData',yData) % update plot
else

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions