Chandra X-Ray Observatory
	(CXC)
Skip to the navigation links
Last modified: December 2013

URL: http://cxc.harvard.edu/chips/ahelp/add_vline.html
AHELP for CIAO 4.9 ChIPS v1

add_vline

Context: lines

Synopsis

Creates a vertical line.

Syntax

add_vline([id,] x [,attributes])

Vertical lines can also be created directly from the GUI using the
"Annotate" menu item.

Description

The function arguments.

Argument Description
id A ChipsId structure identifying the item.
x The location along the horizontal axis through which the vertical line should pass; the current coordinate system is used if the "coordsys" attribute is not set.
attributes Configure object properties by giving an attribute string (a space-separated list of key=value pairs), list, dictionary, or a ChIPS object.

The add_vline command creates a vertical line at the specified x location. The location of the line can be specified in data, pixel, frame, or plot normalized coordinates by using the 'coordsys' attribute. The line extends infinitely along the vertical. 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 vertical 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_vline 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.

Please see the section "Line Preferences and Attributes" below the examples for a list of the line attributes.

Example 1

chips> add_vline(0.1)

Add a vertical line at x=0.1 in the current coordinate system.

Example 2

chips> add_vline(0.5, ['coordsys', PLOT_NORM])

Add the line at the mid-point of the X axis.

Example 3

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

Populate the "vl" structure with the attribute values, then add a vertical line that passes through the point 100 on the x-axis.

Line Preferences and Attributes

The attributes associated with lines are given in the following table, where the "Set?" column refers to whether the attribute can be change using the set_line() command. To change the line preference settings prepend "line." to the attribute name.

Attribute Description Options Default Set?
color line color name or hex; see the Color section of "ahelp chipsopt" default Yes
coordsys coordinate system for the line PIXEL, WINDOW_NORM, FRAME_NORM, PLOT_NORM, DATA see "ahelp coordsys" No
depth Integer value indicating line depth see the Depth section of "ahelp chipsopt" default Yes
extend Should the line extend to infinity (segment vs ray) One of "none", "both", "start", "end", chips_extend_none, chips_extend_both, chips_extend_start, or chips_extend_end. chips_extend_none Yes
stem stem used for line id An alpha-numeric character sequence that does not contain a space line No
style stipple pattern used to draw the line segment see the Line Style section of "ahelp chipsopt" chips_solid Yes
thickness line thickness 0.5 to 10.0; see the Thickness section of "ahelp chipsopt" 1 Yes

Bugs

See the bugs pages on the ChIPS website for an up-to-date listing of known bugs.

See Also

chips
chips, chipsgui, chipsrc, show_gui
concepts
aspectratio, attributes, chipsid, chipsopt, colors, coordsys, currency, depthcontrol, entitycreation, preferences, setget
lines
add_hline, add_line, current_line, delete_line, display_line, get_line, hide_line, move_line, set_line, shuffle_line

Last modified: December 2013
Smithsonian Institute Smithsonian Institute

The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory. 60 Garden Street, Cambridge, MA 02138 USA.   Email:   cxchelp@head.cfa.harvard.edu Smithsonian Institution, Copyright © 1998-2017. All rights reserved.