You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, thank you for your awesome script. Just one question: I'm plotting data incoming from a device every 100 ms, and the simple plot function get slower and slower with time.
So I tried reduce_plot, but I'm not able to recursively update the plot.
function TimerClbk(hObject,event)
l = get(h.axis,'Children')
if isempty(l)
% if no plot is present, plot the data
rp = reduce_plot(h.axis,X,Y)
else
% otherwise update the data
set(rp,'XData',newX,'YData',newY)
end
it always stays the same...
am I doing it right?
The text was updated successfully, but these errors were encountered:
Hello, thank you for your awesome script. Just one question: I'm plotting data incoming from a device every 100 ms, and the simple plot function get slower and slower with time.
So I tried reduce_plot, but I'm not able to recursively update the plot.
my code works like this.
% define timer
timer('Period',0.1,'TimerFcn',@TimerClbk)
function TimerClbk(hObject,event)
l = get(h.axis,'Children')
if isempty(l)
% if no plot is present, plot the data
rp = reduce_plot(h.axis,X,Y)
else
% otherwise update the data
set(rp,'XData',newX,'YData',newY)
end
it always stays the same...
am I doing it right?
The text was updated successfully, but these errors were encountered: