|
|
|
|
SynopsisCreates a line segment. Syntaxadd_line( [ChipsId,] x1, y1, x2, y2 [,attributes]) add_line( [ChipsId,] xvals, yvals, [,attributes]) Description
The add_line command creates a line segment whose attributes are specified by user preferences or in an attribute list. The new line becomes current by default; providing a ChipsId overrides the currency state. The endpoints of the line can be specified in data, pixel, frame, or plot normalized coordinates. Lines specified in data coordinates will be clipped at plot boundaries. The "extend" attribute enables lines which extend to infinity. Customizing the LineThere are several attributes that control the line characteristics. The attributes can be set to the ChIPS defaults, values provided in the add_line command, or values from the user's preference file. The attributes may also be modified with the set_line command at any time; see "ahelp py.chips set_line" and "ahelp py.chips setget" for more information. The attributes associated with lines are:
Example 1chips> add_line(.1,.1,.9,.9) Add a diagonal line extending from (.1,.1) to (.9,.9) in the current coordinate system. Example 2chips> settings = ChipsLine() chips> settings.color = 'blue' chips> settings.thickness = 0.5 chips> settings.stem = 'MyLine' chips> add_line(100,100,200,150,settings) Populate the "settings" structure with the attribute values, then add a line segment from (100,100) to (200,150). Example 3chips> add_line([.1,.5,.9],[.9,.2,.7],['color', 'blue', 'style', 'dot']) Create a blue dotted line comprised of two segments, specifying the attribute values in a list. BugsSee the bugs pages on the ChIPS website for an up-to-date listing of known bugs. |
![]() |
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. |