|
|
|
|
SynopsisRetrieves the attribute value(s) of the histogram. Syntaxget_histogram(); get_histogram(id [,attribute]); Description
The get_histogram command returns a structure containing all the attribute values of the histogram. 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 histograms are:
Data RangeThe get_histogram_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_histogram_xrange and get_histogram_yrange. To see if a histogram is hidden or visible, use the get_histogram_visible command. Advanced FunctionsThe module of advanced ChIPS functions contains other commands for retrieving attribute values (refer to "ahelp chips" for information on loading the module): get_histogram_depth get_histogram_dropline get_histogram_errcolor get_histogram_errdown get_histogram_errstyle get_histogram_errthickness get_histogram_errup get_histogram_fill get_histogram_fillcolor get_histogram_fillopacity get_histogram_linecolor get_histogram_linestyle get_histogram_linethickness get_histogram_symbolangle get_histogram_symbolcolor get_histogram_symbolfill get_histogram_symbolsize get_histogram_symbolstyle Example 1
chips> add_histogram("peak.fits[cols energy,counts]");
chips> print(get_histogram());
chips> print(get_histogram("hist1","fill.color"));A histogram is created and becomes current. Calling get_histogram with no argument returns all the attributes of the object. get_histogram is called a second time to return just the "fill.color" attribute. Example 2
chips> add_histogram("peak.fits[cols energy,counts]");
chips> add_histogram([10,12,15]);
chips> print(get_histogram("hist1"));Two histograms are created. get_histogram is called with the id of the first histogram, returning all attributes. Example 3chips> id=ChipsId(); chips> id.histogram="hist1"; chips> print(get_histogram(id)); A ChipsId structure is created and the id.histogram field is set to "hist1". get_histogram is called with the ChipsId. Example 4chips> histatt=get_histogram; chips> print(histatt); Retrieve a structure containing the attribute values of the current histogram and store the results in "histatt". Print the contents of "histatt". CHANGES IN CIAO 4.1The attribute "fill.style" replaces the "fill.visible" attribute. There are multiple fill styles available, instead of a boolean filled/not filled. A value of 0 (chips_nofill) is equivalent to fill.visible=0; a value of 1 (chips_solidfill) is equivalent to fill.visible=1 . BugsSee the bugs pages on the ChIPS website for an up-to-date listing of known bugs. |
![]() |
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. |