xlim在MATLAB中使用时,您设置的限制将成为“原始视图”。
这意味着右键单击缩放工具,选择“重置为原始视图”不会缩小到整个范围。
例如:
figure(1);
x = 0:0.1:6
plot( x, sin(x) ); % Example plot, x axis range [0, 6]
xlim( [2, 4] ); % 'Zoom' into the x axis range [2, 4]
% Limits are unchanged at [2, 4] when [0, 6] is desirable.