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

URL: http://cxc.harvard.edu/chips/move.html
Jump to: Description · Examples · Bugs


AHELP for CIAO 4.5 ChIPS v1

move

Context: utilities

Synopsis

Moves the specified object to a new location.

Syntax

move( [ChipsId,] object, xval, yval [,mode])

Description

  • ChipsId - an optional ChipsId structure containing values to modify the currency state for the command.
  • object - what type of object to modify, such as chips_window or chips_curve; see the Object Type section of "ahelp chipsopt"
  • xval - new x location or the difference to move in x
  • yval - new y location or the difference to move in y
  • mode - reposition using absolute (0) or delta (1) values

The move command moves the specified object to a new position. The new location may be specified as an absolute position (default) or as relative offsets from the original location.

The coordinate system for the move is specified by setting the coord_sys field of the optional ChipsId structure which may be passed into the move routine. If a ChipsId is not provided, the default coordinate system of the object is used.

The following coordinate systems may be used for movable objects:

Object Pixel Window_Norm Frame_Norm Plot_Norm Data
axis no no yes yes yes
frame yes yes no no no
label yes yes yes yes yes
line yes yes yes yes yes
plot yes yes yes no no
point yes yes yes yes yes
region yes yes yes yes yes

When an object is moved, it remains in its original coordinate system regardless of what coordinate system was used for the move. The move command translates the specified values to the coordinate system associated with the object before applying them. This means that objects that are originally placed in normalized coordinates (such as labels, lines, points, and regions) and get relocated using data coordinates will not be clipped if they land outside the visible data range. Conversely, objects in data coordinates which are moved using normalized coordinates to beyond the plot area will be clipped.

There is also a "move" command for specific ChIPS objects: move_axis, move_colorbar, move_frame, move_image, move_label, move_line, move_plot, move_point, and move_region.

Example 1

chips> move(chips_label,.5,.5)

Move the current label to the center of the frame in frame normalized coordinates.

Example 2

chips> id=ChipsId()
chips> id.coord_sys=PIXEL
chips> move(id,chips_plot,-20,0,1)

For a plot specified in frame normalized coordinates, adjust the position by 20 pixels to the left in the x direction. Do not move it in the y direction.

Bugs

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


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.