|
|
|
|
SynopsisCreates a histogram-style figure. Syntaxadd_histogram([ChipsId,] filename [,attributes]); add_histogram([ChipsId,] TABLECrate [,attributes]); add_histogram([ChipsId,] counts [,attributes]); add_histogram([ChipsId,] bins, counts [,attributes]); add_histogram([ChipsId,] bin_low, bin_high, counts [,attributes]); add_histogram([ChipsId,] bin_low, bin_high, counts, yerrs [,attributes]); add_histogram([ChipsId,] bin_low, bin_high, counts, ydown, yup, [,attributes]); Description
The add_histogram command creates a histogram-style figure whose attributes are specified by user preferences or in an attribute list. The new histogram becomes current by default; providing a ChipsId overrides the currency state. If bin_low or bin_high column is set to "NULL", then the column that is provided is used as the midpoint of the bin. Note that this command does not do any scientific calculations; it takes the input data as given and creates the figure. Customizing the HistogramThere are several attributes that control the histogram characteristics. The attributes can be set to the ChIPS defaults, values provided in the add_histogram command, or values from the user's preference file. The attributes may also be modified with the set_histogram command at any time; see "ahelp set_histogram" and "ahelp setget" for more information. The attributes associated with histograms are:
Example 1
chips> add_histogram("peak.fits[cols energy,counts]");Create a histogram from energy and counts columns in the file "peak.fits". Example 2
chips> dat = read_file("peak.fits[cols energy,counts]");
chips> add_histogram(dat);Create a histogram from energy and counts columns in the file "peak.fits" via CRATES. Example 3chips> add_histogram([10,12,15]); A simple add_histogram command, using the default attribute values. This command will divide the x-axis into three equally sized bins; the number of bins is the same as the number of elements in the counts array. The range of the x axis is also equal to the number of bins in the counts array. The center of the x bin ranges are equal to the integer number of bins (i.e. 1.0, 2.0, and 3.0). The Y axis is scaled to the min and max of the counts range array values. Example 4
chips> add_histogram([1,5,9], [10, 15, 20],{"dropline", "on"});Create three bins of counts of 10, 15 and 20 centered at 1, 5, and 9. The value of dropline is "on", and adjacent bins share borders, so all bin borders are rendered. Example 5chips> add_histogram([10, 15, 20], [12, 17, 22], [5,8,13]); Create three bins of counts of 5, 8 and 13. As both the bin_low and bin_high arrays have been given, they are used to specify the actual bin bounds instead of centers. Example 6
chips> add_histogram([10, 15, 20], [12, 17, 22], [5,8,13], [1,1,2]);
chips> set_histogram({"symbol.style", "diamond", "err.style",
"capped"});The previous example is repeated, but symmetric error bars of lengths 1, 1, and 2 have been added. The error style is "bar", and the error bar is centered on the bin. Example 7
chips> add_histogram([10, 15, 20], [12, 17, 22], [5,8,13], [1,1,2],
[2,4,4]);
chips> set_histogram({"symbol.style", "cross", "err.style", "capped"});The previous example is repeated, but with asymmetric error bars (low values of 1,1,2 and high values of 2,4,4). CHANGES IN CIAO 4.1Pattern fill optionsThe 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 . Default color not changing for printingThe histogram and region fill colors when set to default were not being changed from a display foreground color to a postscript foreground color. 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. |