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

URL: http://cxc.harvard.edu/chips/add_point.html
AHELP for CIAO 4.5 ChIPS v1

add_point

Context: points

Synopsis

Creates a point.

Syntax

add_point([ChipsId,] xpos, ypos, [,attributes])

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

Description

  • ChipsId - an optional ChipsId structure containing values to modify the currency state for the command.
  • xpos, ypos - the location of the point; 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_point command creates a point whose attributes are specified by user preferences or in an attribute list. The new point becomes current by default; providing a ChipsId overrides the currency state.

The user specifies the location of the point as a coordinate pair (xpos and ypos). This position can be specified in data, pixel, frame, or plot normalized coordinates. Points specified in data coordinates will only be displayed if the are within the coordinate system range.

Customizing the Point

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

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

Please see the section "Point Preferences and Attributes" below the examples for a list of the point preferences.

Example 1

chips> add_point(0.4, 0.5)

Add a point at position (.4,.5) in the current coordinate system.

Example 2

chips> add_point(5, 10, ["color", "blue", "style", "uptriangle",
"size", 12])

Add an upward-pointing triangle point, specifying the attribute values in a list.

Example 3

chips> pnt = ChipsPoint()
chips> pnt.color = "blue"
chips> pnt.size = 18
chips> pnt.stem = "MyPoint"
chips> add_point(100, 100, pnt)

Populating the "pnt" structure with the attribute values, then adding the point.

Point Preferences and Attributes

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

Attribute Description Options Default Set?
angle Angle, in degrees, at which the point is drawn -360.0 to 360.0 0.0 Yes
color color of the point name or hex; see the Color section of "ahelp chipsopt" default Yes
coordsys coordinate system for the point PIXEL, WINDOW_NORM, FRAME_NORM, PLOT_NORM, DATA see "ahelp coordsys" Yes
depth Integer value indicating point depth see the Depth section of "ahelp chipsopt" default Yes
fill fill the point? see the Booleans section of "ahelp chipsopt" true Yes
size size of the point 1 to 100 12 Yes
stem stem used for point id An alpha-numeric character sequence that does not contain a space pnt No
style symbol style see the Symbol Styles section of "ahelp chipsopt" cross Yes

Changes in CIAO 4.5

Points can now be added directly from the GUI, using either the "Annotate" menu item or the "Annotate" option brought up by using the Right-Mouse Button in the ChIPS window.

Coordinate system support

It is now possible to set the coordsys attribute of annotation objects - i.e. those created by ChipsLabel(), ChipsLine(), ChipsPoint(), ChipsRegion(), and ChipsColorBar() - to define the coordinate system used to create the object. So the following will add a label - of the current time - to the bottom-right corner of the frame.

chips> l = ChipsLabel()
chips> l.coordsys = FRAME_NORM
chips> l.halign = 1
chips> import time
chips> add_label(0.95, 0.05, time.asctime(), l)

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
points
current_point, delete_point, display_point, get_point, hide_point, move_point, set_point, shuffle_point

Last modified: December 2012
CXC logo

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-2012. All rights reserved.