www.gusucode.com > mbcview 工具箱matlab源码程序 > mbcview/@cgtradeoffgui/@toGVDataModel/getGraphXLimits.m
function lims = getGraphXLimits(obj, R, C) %GETGRAPHXLIMITS Return the appropriate graphing x-limits % % LIMS = GETGRAPHXLIMITS(OBJ, R, C) returns a [xmin, xmax] pair that % should be used for the graph at (R, C). This may be different from the % data's x-limits if zooming is engaged for the graph. % % If R is set to zero, the limits for the graph header will be % supplied. % Copyright 2000-2004 The MathWorks, Inc. and Ford Global Technologies, Inc. lims = obj.XLimits(C, :); if R==0 R = 1; end if obj.isGraphZoomed(R, C) scale = obj.XZoomScales{C}; if ~isempty(scale) % Zoom is in x-axis range = lims(2)-lims(1); lims = lims(1) + scale.*range; end end