When executing the code, a very small screen appears in which, if you do not increase, the graph is not seen. I want to enlarge the window and center the graph but I don't know how .Position works
Code:
fh = figure;
P = copyobj(handles.axes3, fh);
set(fh, 'MenuBar', 'none', 'Position', [fh.Position(1:2) handles.uipanel3.Position(3:4)]);
set(get(P, 'YLabel'), 'String', 'Voltaje (V)');
set(get(P, 'XLabel'), 'String', 'Tiempo (seg)');
F = getframe(handles.axes3);
Image = frame2im(F);
archivo = strcat(handles.nombre, '.png');
imwrite(Image, archivo);

3 commentaires

fh.Position = [x, y, width, height];
Maria Miranda Jiménez
Maria Miranda Jiménez le 5 Mai 2021
Thanks!!
You could also try,
fh.WindowState = 'maximized';

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Startup and Shutdown dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by