MATLAB: Hi every body.the question is how can i change size of plot window in Matlab. like this picture. i want change the black window size as big as blue window. i want reduce plot window border.

change sizefigureplot

Best Answer

plot(1:100, sin(1:100))
title('basic plot');
xlabel('x axis');
ylabel('y axis');
set(gca, 'units', 'normalized'); %Just making sure it's normalized
Tight = get(gca, 'TightInset'); %Gives you the bording spacing between plot box and any axis labels
%[Left Bottom Right Top] spacing
NewPos = [Tight(1) Tight(2) 1-Tight(1)-Tight(3) 1-Tight(2)-Tight(4)]; %New plot position [X Y W H]
set(gca, 'Position', NewPos);
More information can be found here