Chandra X-Ray Observatory
Skip to the navigation links
Last modified: December 2013

AHELP for CIAO 4.10 ChIPS v1


Context: curves


Modifies the attributes of an existing curve.


set_curve(id, attributes)


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_curve command sets the specified attributes to the provided values. The modified curve becomes current. Multiple curves may be modified with a single command by setting the currency to "all".

Customizing the Curve

There are several attributes that control the characteristics of curves. The set_curve command may be used to modify the attribute values of an existing curve 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 curve will not be modified.

Please see the "Curve Preferences and Attributes" section below the examples for a list of the curve preferences.

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):



Example 1

chips> set_curve(["line.color", "gold", "symbol.color", "forest"])

Using attribute/value pairs, set the curve line color to gold and the symbol color to forest green.

Example 2

chips> avals = { 'line.color': 'gold', 'symbol.color': 'forest' }
chips> set_curve(avals)

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

Example 3

chips> set_curve(["*.color", "green"])

Here we use the "*.color" shortform to set all the color attributes of the curve - e.g. line, symbol, and error - to green.

Example 4

chips> set_curve(["err.*", False])

To set err.up, err.down, err.left, and err.right at the same time, use the "err.*" name. In this example all the error bars are turned off. This can also be achieved by saying:

chips> set_curve(["err.up", False, "err.down", False, "err.left",
False, "err.right", False])

Example 5

chips> s = ChipsCurve()
chips> s.err.color = "red"
chips> = "cap"
chips> set_curve("crv1", s)

Populate the "s" structure with attribute values, then use it to set the error style to capped and the error color to red for the curve with the id "crv1".

Example 6

chips> s = ChipsCurve()
chips> s.all.color = "red"
chips> s.all.thickness = 2
chips> set_curve("crv1", s)

Here we change all the color attributes of the curve "crv1" to red and the thickness attributes to 2.

Curve Preferences and Attributes

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

Attribute Description Options Default Set?
baddata How to handle NaNs and +/-infs in data omit, ignore: omit means to discard bad data point and leave gap, ignore means discard bad points, connecting the surrounding points omit Yes
depth Depth of the curve see the Depth section of "ahelp chipsopt" default Yes
err.caplength Length of the cap drawn on error bars (when is cap). 1 to 100, inclusive. 10 Yes
err.color Color of the curve err bars name or hex; see the Color section of "ahelp chipsopt" default Yes
err.down Plot y down errors if data provided see the Booleans section of "ahelp chipsopt" true Yes
err.left Plot x down errors if data provided see the Booleans section of "ahelp chipsopt" true Yes
err.right Plot x up errors if data provided see the Booleans section of "ahelp chipsopt" true Yes Specifies the error bar style bar|line|cap (bar and line are identical) line Yes
err.thickness Specifies the thickness of error bars 0.5 to 10.0; see the Thickness section of "ahelp chipsopt" 1 Yes
err.up Plot y up errors if data provided see the Booleans section of "ahelp chipsopt" true Yes
limitlength Length of the bars for upper and lower limits 0 to 1 in plot normalized coordinates 0.05 Yes
limitoverride Should both the limit and the error bar be drawn on a point? true = hide the errors, false = show the errors; see the Booleans section of "ahelp chipsopt" true Yes
line.color Color of the curve line name or hex; see the Color section of "ahelp chipsopt" default Yes the pattern used for the curve line style see the Line Style section of "ahelp chipsopt" solid Yes
line.thickness Thickness of the curve line 0.5 to 10.0; see the Thickness section of "ahelp chipsopt" 1 Yes
stem Stem used for curve id An alpha-numeric character sequence that does not contain a space crv No
symbol.angle The angle, in degrees, of rotation for the curve symbols -360.0 to 360.0 0.0 Yes
symbol.color Color of the curve symbols name or hex; see the Color section of "ahelp chipsopt" default Yes
symbol.fill Should the curve symbols be filled or not see the Booleans section of "ahelp chipsopt" true Yes
symbol.size Size of the curve symbols 1 to 100 2 Yes The shape of the glyph used as the curve symbols see the Symbol Styles section of "ahelp chipsopt" cross Yes


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

See Also

add_curve, current_curve, delete_curve, display_curve, get_curve, hide_curve, shuffle_curve

Last modified: December 2013
Smithsonian Institute Smithsonian Institute

The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory. 60 Garden Street, Cambridge, MA 02138 USA.   Email: Smithsonian Institution, Copyright © 1998-2017. All rights reserved.