How can i show plot inside ui app instead of another figure window?
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Kacper Gawinkowski
le 17 Août 2019
Commenté : Adam Danz
le 18 Août 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 commentaires
Réponse acceptée
Adam Danz
le 17 Août 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 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Animation dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!