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/set_histogram.sl.html
AHELP for ChIPS 4.1

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 attributes" and "ahelp 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 chipsopt" 100
dropline Boolean indicating whether vertical lines delineating each histogram bin should be drawn see the Boolean section of "ahelp chipsopt" true
err.color Color of the histogram err bars name or hex; see the Color section of "ahelp chipsopt" default
err.down Plot y down errors if data provided see the Boolean section of "ahelp 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 chipsopt" true
fill.color Color of the histogram fill name or hex; see the Color section of "ahelp chipsopt" default
fill.opacity Opacity of the histogram fill 0.0:1.0 1.0
fill.style The fill style for the histogram see the Fill Pattern section of "ahelp chipsopt" 0 (no fill)
line.color Color of the histogram line name or hex; see the Color section of "ahelp chipsopt" default
line.style the pattern used for the histogram line style see the Line Style section of "ahelp 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 name or hex; see the Color section of "ahelp chipsopt" default
symbol.fill Should the histogram symbols be filled or not see the Boolean section of "ahelp 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 chipsopt" chips_none

Advanced Functions

The module of advanced ChIPS functions contains other commands for setting attribute values (refer to "ahelp chips" for information on loading the module):

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> s = ChipsHistogram;
chips> s.err.color = "red";
chips> s.symbol.style = chips_cross;
chips> set_histogram("hist1", s);

Populate the "s" structure with attribute values, then use it to set red errors and cross-shaped symbols for the histogram called "hist1".

Example 3

chips> a = struct { dropline = 1, 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.

CHANGES IN CIAO 4.1

Pattern fill options

The 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. See the Fill Patterns section of "ahelp chipsopt" for a full list of fill patterns.

Default color not changing for printing

The histogram and region fill colors when set to default were not being changed from a display foreground color to a postscript foreground color.

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.