Change Position of figure
Afficher commentaires plus anciens
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
Walter Roberson
le 5 Mai 2021
fh.Position = [x, y, width, height];
Maria Miranda Jiménez
le 5 Mai 2021
Adam Danz
le 5 Mai 2021
You could also try,
fh.WindowState = 'maximized';
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!