GUI Live Plot Issues

2 ビュー (過去 30 日間)
William Maurer
William Maurer 2015 年 7 月 11 日
コメント済み: William Maurer 2015 年 7 月 12 日
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

採用された回答

Walter Roberson
Walter Roberson 2015 年 7 月 12 日
hold(handles.axes2, 'on')
  1 件のコメント
William Maurer
William Maurer 2015 年 7 月 12 日
Worked like a charm- thank you!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDiscrete Data Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by