MATLAB: How to scale a plot to fit a plot window without white end

fit plotMATLABplotscale x-axis

Whenever I plot data, there is some white space left on the right end. Is there a command to scale the plot all over the plot box ? In this case make the x-Axis show the data from 0-260
x = 0:260; % Create Data

y = rand(size(x)); % Create Data
figure(1)
plot(x, y)
I already tried axis([0 259 min(y) max(y)]); but this did not help

Best Answer

xlim([0 260])
Related Question