How can i show plot inside ui app instead of another figure window?
7 views (last 30 days)
Show older comments
Kacper Gawinkowski
on 17 Aug 2019
Commented: Adam Danz
on 18 Aug 2019
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 Comments
Accepted Answer
Adam Danz
on 17 Aug 2019
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 Comments
More Answers (0)
See Also
Categories
Find more on Animation 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!