GUI Live Plot Issues

2 views (last 30 days)
William Maurer
William Maurer on 11 Jul 2015
Commented: William Maurer on 12 Jul 2015
Hi there,
I am attempting to run a GUI that will output a plot of position obtained from a video. There are nested for loops for stepping through a video, then finding points to plot. As these points are found I would like them to all go to the same plot. My issue is that the axes go crazy as they autosize each time I initialize scatter- despite using hold on. Below is a cut down version of my code (I think it should be enough to represent the situation).
axes(handles.axes2)
set(handles.axes2,'Ydir','reverse');
xlim([0,720]);
ylim([0,480]);
grid on
for i = 1:numframes
if get(handles.stopper,'UserData')
pause on
uiwait
pause off
end
for j:(something relating to bboxes)
dataxy = calculations
scatter(datax,datay,'Parent',handles.axes2)
draw now
hold on
end
for k:(something relating to centroids)
dataxy = calculations2
scatter(datax,datay,'Parent',handles.axes2)
draw now
hold on
end
end
Any help is greatly appreciated.
Best regards,
Will

Accepted Answer

Walter Roberson
Walter Roberson on 12 Jul 2015
hold(handles.axes2, 'on')

More Answers (0)

Categories

Find more on Discrete Data Plots in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!