|
|
|
|
SynopsisChanges the limits of one or more axes of the current plot. Syntaxlimits([ChipsId,] dimension, min, max) limits([ChipsId,] dimension, object, ChipsId) limits([ChipsId,] object, id) Description
The limits command sets the axes ranges for the x and/or y dimensions of the current plot. There are three ways to specify the limit values:
If the minimum value is greater than the maximum value, ChIPS automatically transposes them. When the limits of an axis are changed, any axes that are bound to that axis are also changed, including plot border axes; see "ahelp bind_axes" for more information. The automin and automax properties of the modified axis are disabled as well when it is altered by a limits command. Reenable the automin and automax properties of the axis so that it will automatically rescale when new objects are added; see "ahelp set_axis" for more information. The pick_limits call ("ahelp pick_limits") allows you to change the limits of a plot interactively. Example 1chips> limits(XY_AXIS, AUTO, 100) The command automatically calculates the minimum limit of the current x and y axes from the data. The maximum value of both axes is set to 100. Example 2
chips> split(2,1,0.1)
chips> add_curve([1,7,9],[2,3,1])
chips> current_plot("plot2")
chips> add_curve([5,10,15],[25,50,55])
chips> limits(X_AXIS, 5, 10)
chips> current_plot("plot1")
chips> limits(X_AXIS, 5, 10)Create a pair of plots which each contain a curve. The x-axis limits are changed in the current plot - plot2 - to 5:10. Then plot1 is made current and the same x-axis limits are applied. Refer to the bind_axes command for an alternate method of matching axis attributes between plots. Example 3chips> add_curve([40,50,60], [50,40,60], "line.color=red") chips> add_curve([50,60,70], [50,60,70]," line.color=gold") chips> limits(chips_curve, "crv1") chips> limits(Y_AXIS, chips_curve, "crv2") Snap the limits of both axes to the range of curve "crv1" and then snap the y axis range to the range of curve "crv2" Example 4chips> limits(X_AXIS, 4, 10) chips> set_axis(["automin", True, "automax", True]) chips> add_curve([-23,4,15], [10,8,11]) Set the X-axis limits of the current plot to run from 4 to 10. Then reenable the automin and automax properties of the axis. When the curve is added, the axis limits automatically adjust. BugsSee the bugs pages on the ChIPS website for an up-to-date listing of known bugs. See Also
|
![]() |
The Chandra X-Ray
Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory. 60 Garden Street, Cambridge, MA 02138 USA. Email: cxcweb@head.cfa.harvard.edu Smithsonian Institution, Copyright © 1998-2004. All rights reserved. |