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 2008

URL: http://cxc.harvard.edu/chips4.1/get_curve.sl.html
AHELP for ChIPS 4.1

get_curve

Context: sl.chips

Synopsis

Retrieves the attribute value(s) of the curve.

Syntax

get_curve();
get_curve(id [,attribute]);

Description

  • id - an optional ChipsId structure containing values to modify the currency state for the command or a string id to specify a curve within the current plot.
  • attribute - a string containing the name of the attribute to retrieve

The get_curve command returns a structure containing all the attribute values of the curve. 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.

The attributes associated with curves are:

Attribute Description
baddata How to handle NaNs and +/-infs in data
depth Integer value indicating line depth
err.color Color of the curve err bars
err.down Plot y down errors if data provided
err.left Plot x down errors if data provided
err.right Plot x up errors if data provided
err.style Specifies the error bar style
err.thickness Specifies the thickness of error bars
err.up Plot y up errors if data provided
limitlength Length of the bars for upper and lower limits
limitoverride Should both the limit and the error bar be drawn on a point?
line.color Color of the curve line
line.style the pattern used for the curve line style
line.thickness Thickness of the curve line
symbol.angle The angle of rotation for the curve symbols
symbol.color Color of the curve symbols
symbol.fill Should the curve symbols be filled or not
symbol.size Size of the curve symbols
symbol.style The shape of the glyph used as the curve symbols

Data Range

The get_curve_range command returns the X and Y ranges of the current axes of the current plot. The values are returned as [xmin, xmax, ymin, ymax]. There are also individual commands for retrieving just the x or y range: get_curve_xrange and get_curve_yrange.

To see if a curve is hidden or visible, use the get_curve_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):

get_curve_baddatamode
get_curve_depth
get_curve_errcolor
get_curve_errdown
get_curve_errleft
get_curve_errright
get_curve_errstyle
get_curve_errthickness
get_curve_errup
get_curve_limitlength
get_curve_limitoverride
get_curve_linecolor
get_curve_linestyle
get_curve_linethickness
get_curve_symbolangle
get_curve_symbolcolor
get_curve_symbolfill
get_curve_symbolsize
get_curve_symbolstyle

Example 1

chips> add_curve("lc.fits[cols time, count _rate]");
chips> print(get_curve());
chips> print(get_curve("crv1","line.color"));

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

Example 2

chips> add_curve("lc.fits[cols time, count _rate]");
chips> x = [0:10];
chips> add_curve(x, x^2);
chips> print(get_curve("crv1"));

Two curves are created. get_curve is called with the id of the first curve, returning all attributes.

Example 3

chips> id=ChipsId();
chips> id.curve="crv1";
chips> print(get_curve(id));

A ChipsId structure is created and the id.curve field is set to "crv1". get_curve is called with the ChipsId.

Example 4

chips> crvatt=get_curve;
chips> print(crvatt);

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

Bugs

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

Last modified: December 2008



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.