Last modified: December 2013

AHELP for CIAO 4.11 ChIPS v1


Context: lines


Retrieves the attribute value(s) of the line.


get_line(id, attribute)


The function arguments.

Argument Description
id A ChipsId structure identifying the item, or a string containing the name of the object.
attribute The name of the attribute to retrieve, such as 'style' or 'color'.

The get_line command returns a structure containing all the attribute values of the line. To retrieve the value of a specific attribute, provide the attribute name and the id or ChipsId of the object.

Some values are set to "None" in the returned structure. These entries generally correspond to attributes which may only be modified at creation time, such as the object id.

Please see the section "Line Preferences and Attributes" below the examples for a list of the line attributes.

To see if a line is hidden or visible, use the get_line_visible command.

Advanced Functions

The module of advanced ChIPS functions contains other commands for retrieving attribute values (refer to "ahelp chips" for information on loading the module):



Example 1

chips> add_line(.1,.1,.9,.9,"thickness=9 id=line1")
chips> print(get_line())
chips> print(get_line("line1","style"))

A line is created and becomes current. Calling get_line with no argument returns all the attributes of the object. get_line is called a second time to return just the "style" attribute.

Example 2

chips> add_line(.1,.1,.9,.9,"thickness=9 id=line1")
chips> add_line(.6,.1,.6,.9,"thickness=9 color=lime")
chips> print(get_line("line1"))

Two lines are created. get_line is called with the id of the first line, returning all attributes.

Example 3

chips> id=ChipsId()
chips> id.line="line1"
chips> print(get_line(id))

A ChipsId structure is created and the id.line field is set to "line1". get_line is called with the ChipsId.

Example 4

chips> li = get_line()
chips> print(li)

Retrieve a structure containing the attribute values of the current line and store the results in "li". Print the contents of "li".

Line Preferences and Attributes

The attributes associated with lines are given in the following table, where the "Set?" column refers to whether the attribute can be change using the set_line() command. To change the line preference settings prepend "line." to the attribute name.

Attribute Description Options Default Set?
color line color name or hex; see the Color section of "ahelp chipsopt" default Yes
coordsys coordinate system for the line PIXEL, WINDOW_NORM, FRAME_NORM, PLOT_NORM, DATA see "ahelp coordsys" No
depth Integer value indicating line depth see the Depth section of "ahelp chipsopt" default Yes
extend Should the line extend to infinity (segment vs ray) One of "none", "both", "start", "end", chips_extend_none, chips_extend_both, chips_extend_start, or chips_extend_end. chips_extend_none Yes
stem stem used for line id An alpha-numeric character sequence that does not contain a space line No
style stipple pattern used to draw the line segment see the Line Style section of "ahelp chipsopt" chips_solid Yes
thickness line thickness 0.5 to 10.0; see the Thickness section of "ahelp chipsopt" 1 Yes


See the bugs pages on the ChIPS website for an up-to-date listing of known bugs.

See Also

add_hline, add_line, add_vline, current_line, delete_line, display_line, hide_line, move_line, set_line, shuffle_line