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_histogram.sl.html
AHELP for ChIPS 4.0 set_histogram Context: sl.chips

Synopsis

Modifies the attributes of an existing histogram.

Syntax

set_histogram([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 histogram within the current plot.
  • values - a list containing attribute value pairs or a ChipsHistogram object.

The set_histogram command sets the specified attributes to the provided values. The modified histogram becomes current. Multiple histograms may be modified with a single command by setting the currency to "all".

Customizing the Histogram

There are several attributes that control the characteristics of histograms. The set_histogram command may be used to modify the attribute values of an existing histogram at any time during a ChIPS session. See "ahelp sl.chips attributes" and "ahelp sl.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 histogram will not be modified.

The attributes associated with histograms are:

Attribute Description Options Default
depth Integer value indicating line depth see the Depth section of "ahelp sl.chips chipsopt" 100
dropline Boolean indicating whether vertical lines delineating each histogram bin should be drawn see the Boolean section of "ahelp sl.chips chipsopt" true
err.color Color of the histogram err bars see the Color section of "ahelp sl.chips chipsopt" default
err.down Plot y down errors if data provided see the Boolean section of "ahelp sl.chips chipsopt" true
err.style Specifies the error bar style "bar"|"cap" "bar"
err.thickness Specifies the thickness of error bars 0.5:9 1
err.up Plot y up errors if data provided see the Boolean section of "ahelp sl.chips chipsopt" true
fill.color Color of the histogram fill, if visible see the Color section of "ahelp sl.chips chipsopt" default
fill.opacity Opacity of the histogram fill, if visible 0.0:1.0 1.0
fill.visible Should the histogram be filled or not false|true; see the Booleans section of "ahelp sl.chips chipsopt" false
line.color Color of the histogram line see the Color section of "ahelp sl.chips chipsopt" default
line.style the pattern used for the histogram line style see the Line Style section of "ahelp sl.chips chipsopt" chips_solid
line.thickness Thickness of the histogram line 0.5:9 1
symbol.angle The angle of rotation for the histogram symbols -360.0:360.0 0.0
symbol.color Color of the histogram symbols see the Color section of "ahelp sl.chips chipsopt" default
symbol.fill Should the histogram symbols be filled or not see the Boolean section of "ahelp sl.chips chipsopt" false
symbol.size Size of the histogram symbols 1:100 5
symbol.style The shape of the glyph used as the histogram symbols see the Symbol Style section of "ahelp sl.chips chipsopt" chips_none

These individual commands are also available for setting attribute values:

set_histogram_depth
set_histogram_dropline
set_histogram_errcolor
set_histogram_errdown
set_histogram_errstyle
set_histogram_errthickness
set_histogram_errup
set_histogram_fill
set_histogram_fillcolor
set_histogram_fillopacity
set_histogram_linecolor
set_histogram_linestyle
set_histogram_linethickness
set_histogram_symbolangle
set_histogram_symbolcolor
set_histogram_symbolfill
set_histogram_symbolsize
set_histogram_symbolstyle

Example 1

chips> set_histogram({"line.color","cornflower","dropline",1});

Using attribute/value pairs, set the histogram line color to cornflower and display droplines.

Example 2

chips> settings = ChipsHistogram;
chips> settings.err.color = "red";
chips> settings.symbol.style = chips_cross;
chips> set_histogram("histogram1",settings);

Populate the "settings" structure with attribute values, then use it to set histogram1 to have red errors and cross-shaped symbols.

Example 3

chips>a =struct {dropline, depth};
chips>a.dropline=1,a.depth=50;
chips>set_histogram(a);

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

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.