I would like to plot a line on an axis without changing the XLim and YLim values. I obviously went through the "axis equal" command (or the ax.XLimMode='manual'; ax.YLimMode='manual';) but this doesn't seems to work.
Where am I doing wrong?
plot(1:10) % XLim is not [1 10]
axis manual plot(1:20) % XLim should be again [1 10], instead it's [0 20] now
it works with
plot(1:10) % XLim is not [1 10] hold on axis manual plot(1:20) % XLim should be again [1 10], instead it's [0 20] now
but I don't want to hold previous plots (it's an animation).
A workaround could be to use
ph=plot(1:10) axis manual hold on delete(ph) plot(1:20)
but I this seems over-complicated to do the simple thing I'm asking to…
I'm working with matlab R2015a
Best Answer