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/add_hline.py.html
AHELP for ChIPS 4.1

add_hline

Context: py.chips

Synopsis

Creates a horizontal line.

Syntax

add_hline( [ChipsId,] y [,attributes])

Description

  • ChipsId - an optional ChipsId structure containing values to modify the currency state for the command.
  • y - the location along the vertical axis through which the horizontal line should pass; the current coordinate system is used if one is not specified.
  • attributes - optional parameters which allow the user to configure properties though a structure, list, or attribute string.

The add_hline command creates a horizontal line at the specified y location. The location of the line can be specified in data, pixel, frame, or plot normalized coordinates. The line extends infinitely along the horizontal. It is clipped appropriately by its coordinate system (e.g. lines in data coordinates or plot normalized will be clipped at plot boundaries).

This command is the same as creating a horizontal line segment with add_line ("ahelp add_line") and setting the "extend" property so that it extends both ends of the line; see the Line Extend section of "ahelp chipsopt" .

Customizing the Line

There are several attributes that control the line characteristics. The attributes can be set to the ChIPS defaults, values provided in the add_hline command, or values from the user's preference file.

The attributes may also be modified with the set_line command at any time; see "ahelp set_line" and "ahelp setget" for more information.

The attributes associated with lines are:

Attribute Description Options Default
color line color name or hex; see the Color section of "ahelp chipsopt" default: white in the ChIPS window, black on printout
coordsys coordinate system for the line PIXEL, WINDOW_NORM, FRAME_NORM, PLOT_NORM, DATA see "ahelp coordsys"
depth Integer value indicating line depth see the Depth section of "ahelp chipsopt" 100
stem stem used for line id alphanumeric line
style stipple pattern used to draw the line segment see the Line Style section of "ahelp chipsopt" chips_solid
thickness line thickness 0.5 to 10.0; see the Thickness section of "ahelp chipsopt" 1

Example 1

chips> add_hline(.1)

Add a horizontal line at .1 axis in the current coordinate system.

Example 2

chips> settings = ChipsLine()
chips> settings.color = 'blue'
chips> settings.thickness = 8.0
chips> settings.stem = 'MyLine'
chips> add_axis (XY_AXIS, 0, 0, 200)
chips> add_hline(100,settings)

Populate the "settings" structure with the attribute values, then add a horizontal line that passes through the point 100 on the y-axis.

CHANGES IN CIAO 4.1

coordsys keyword added to attributes

The attribute "coordsys" sets the coordinate system when the object is created. ChipsIds still can be used to set coordinate systems. If a ChipsId and coordsys attribute are both provided, the coordsys value takes precedence.

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.