About Chandra Archive Proposer Instruments & Calibration Newsletters Data Analysis HelpDesk Calibration Database NASA Archives & Centers Chandra Science Links

Skip the navigation links
Last modified: December 2007

URL: http://cxc.harvard.edu/chips4.0/set_curve.py.html
AHELP for ChIPS 4.0 set_curve Context: py.chips

Synopsis

Modifies the attributes of an existing curve.

Syntax

set_curve([id,] values)

Description

  • id - an optional ChipsId structure containing values to modify the currency state for the command or a string id to modify a curve within the current plot.
  • values - a list containing attribute value pairs or a ChipsCurve 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 py.chips attributes" and "ahelp py.chips 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.

The attributes associated with curves are:

Attribute Description Options Default
baddata How to handle NaNs and +/-infs in data chips_omit|chips_ignore chips_omit
depth Integer value indicating line depth see the Depth section of "ahelp py.chips chipsopt" 100
err.color Color of the curve err bars see the Color section of "ahelp py.chips chipsopt" default
err.down Plot y down errors if data provided true/false true
err.left Plot x down errors if data provided true/false true
err.right Plot x up errors if data provided true/false true
err.style Specifies the error bar style "bar"|"cap" "bar"
err.thickness Specifies the thickness of error bars see the Thickness section of "ahelp py.chips chipsopt" 1
err.up Plot y up errors if data provided true/false true
limitlength Length of the bars for upper and lower limits 0:1 in plot normalized coordinates 0.05
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 py.chips chipsopt" true
line.color Color of the curve line see the Color section of "ahelp py.chips chipsopt" default
line.style the pattern used for the curve line style see the Line Style section of "ahelp py.chips chipsopt" chips_solid
line.thickness Thickness of the curve line see the Thickness section of "ahelp py.chips chipsopt" 1
symbol.angle The angle of rotation for the curve symbols -360.0:360.0 0.0
symbol.color Color of the curve symbols see the Color section of "ahelp py.chips chipsopt" default
symbol.fill Should the curve symbols be filled or not see the Booleans section of "ahelp py.chips chipsopt" true
symbol.size Size of the curve symbols 1:100 5
symbol.style The shape of the glyph used as the curve symbols see the Symbol Style section of "ahelp py.chips chipsopt" chips_cross

These individual commands are also available for setting attribute values:

set_curve_baddatamode
set_curve_depth
set_curve_errcolor
set_curve_errdown
set_curve_errleft
set_curve_errright
set_curve_errstyle
set_curve_errthickness
set_curve_errup
set_curve_limitlength
set_curve_limitoverride
set_curve_linecolor
set_curve_linestyle
set_curve_linethickness
set_curve_symbolangle
set_curve_symbolcolor
set_curve_symbolfill
set_curve_symbolsize
set_curve_symbolstyle

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> settings = ChipsCurve()
chips> settings.err.color = 'red'
chips> settings.err.style = "cap"
chips> set_curve('curve1',settings)

Populate the "settings" structure with attribute values, then use it to set curve1's error style to capped and the error color to red.

Example 3

chips> class lnprop:
chips> def __init__(self):
chips> self.baddata=chips_omit
chips> self.depth=50
chips> set_curve(lnprop())

Create a user-defined structure with baddata and depth fields. Use the structure to modify the values of the current curve.

Bugs

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

Last modified: December 2007



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.