I have a button in my Matlab GUI to open up an axes plot in a new figure, here is my code:
fig=figure; set(fig, 'Position', [100, 100, 1049, 895]); h=handles.axes2; copyobj(h,fig); set(gca,'units','pix') set(gca,'units','norm')
However, the axes is quite small in the new figure:
But when I try to add this line at the bottom of the previous code:
get(gca,{'Position',[100, 100, 1049, 895]}); % [left bottom right top]
nothing changes… I have tried changing the numbers as well but the axes does not get resized…
Can anyone tell me what I'm doing wrong?
Thanks
Best Answer