How can i show plot inside ui app instead of another figure window?
조회 수: 5 (최근 30일)
이전 댓글 표시
Hi, id like to show the plot inside gui app instead of another popping up figure window. Im using Andor Solis library, but i hope that is not the case of my rpoblem. I tried to include data inside PlotUI, but its not working. Here is the code:
[ret,XPixels, YPixels]=GetDetector(); % Get the CCD size
CheckWarning(ret);
[ret]=SetImage(1, 1, 1, XPixels, 1, YPixels); % Set the image size
CheckWarning(ret);
disp('Starting Acquisition');
[ret] = StartAcquisition(); %Starting Acquisition
CheckWarning(ret);
if(app.ReadoutMode==0) % 0=plot
[ret,gstatus]=AndorGetStatus;
CheckWarning(ret);
while(gstatus ~= atmcd.DRV_IDLE)
pause(1.0);
disp('Acquiring');
[ret,gstatus]=AndorGetStatus;
CheckWarning(ret);
end
[ret, imageData] = GetMostRecentImage(XPixels); %gets data ( [ret, arr] = GetMostRecentImage(size) )
CheckWarning(ret);
if ret == atmcd.DRV_SUCCESS
plot(imageData); %draws plot
end
댓글 수: 0
채택된 답변
Adam Danz
2019년 8월 17일
Specify the UI Axis handle in the first input to plot().
plot(app.UIAxes, imageData);
% __________ or whatever the handle is to your ui axes
댓글 수: 5
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Animation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!