Last modified: December 2013

URL: https://cxc.cfa.harvard.edu/chips/ahelp/set_line.html
AHELP for CIAO 4.11 ChIPS v1

set_line

Context: lines

Synopsis

Modifies the attributes of an existing line.

Syntax

set_line(attributes)
set_line(id, attributes)

Description

The function arguments.

Argument Description
id A ChipsId structure identifying the item, or a string containing the name of the object.
attributes Configure object properties by giving an attribute string (a space-separated list of key=value pairs), list, dictionary, or a ChIPS object.

The set_line command sets the specified attributes to the provided values. The modified line becomes current. Multiple lines may be modified with a single command by setting the currency to "all".

Customizing the Line

There are several attributes that control the characteristics of lines. The set_line command may be used to modify the attribute values of an existing line at any time during a ChIPS session. See "ahelp attributes" and "ahelp setget" for more general information.

If multiple attributes are being set simultaneously and one of them fails, the entire command will fail and the line will not be modified.

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

Advanced Functions

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

set_line_color
set_line_depth
set_line_extend
set_line_stipple
set_line_style
set_line_thickness

Examples

Example 1

chips> set_line(["color", "plum", "style", "dot"])

Using attribute/value pairs, set the line color to plum and the stipple pattern to dot.

Example 2

chips> set_line({"color": "plum", "style": "dot"}}

This is a repeat of the previous example, using a dictionary rather than a list to define the attributes to change.

Example 3

chips> lne = ChipsLine()
chips> lne.color = "blue"
chips> lne.thickness = 2
chips> set_line("line1", lne)

Populate the "lne" structure with attribute values, then use it to set line1 to be blue with a thickness of 2.


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

Bugs

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

See Also

concepts
setget
lines
add_hline, add_line, add_vline, current_line, delete_line, display_line, get_line, hide_line, move_line, shuffle_line
utilities
set_current