As far as I know, Matlab does not have a function like you describe, however ...
You can fine-tune the limits of X and Y by running the following command:
set(gca,'XLim',[x1 x2], 'YLim',[y1 y2]);
A quick alias for the same command:
axis([xmin xmax ymin ymax]);
You can also βfreezeβ limits at any time by changing XLimMode and YLimMode from Auto to Manual :
figure(); a=plot(1:10); %A pause(); set(a,'ydata',1:2:20); %B pause(); set(gca,'XLimMode','manual'); set(gca,'YLimMode','manual'); set(a,'ydata',1:10); %C
Or you can use another alias that does the same:
axis('manual');
If data is constantly being received, consider storing the axis boundaries before each update, and then perform manual scaling.
source share