Change Position of figure

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 Comments

fh.Position = [x, y, width, height];
You could also try,
fh.WindowState = 'maximized';

Sign in to comment.

Answers (0)

Categories

Commented:

on 5 May 2021

Community Treasure Hunt

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

Start Hunting!