I'm not sure if it is a bug or feature per se, but it was certainly an unexpected behaviour.
Two following figures produce different output
x = 0:0.1:2*pi;y = sin(x);z = cos(x);figureplot(x, y)hold onplot(x, z)figurehold onplot(x, y)plot(x, z)
The difference is in presence of "border" on right and upper sides of picture.
Could someone explain to me the reason for this differences?
As far as I understand
figureplot(x, y)
produces a picture with border, and hold on after that doesn't change the fact.
On the other hand
figure
does not create axes, after that
hold on
creates axes for some reason without the border, after that all plots do not change it for some reason.
Is there an actual way to hardcode the border (or the absence of it) in commands? Why does it work the way it works?
Best Answer