| AHELP for CIAO 4.5 ChIPS v1 | move_axis |
Context: axes |
Synopsis
Moves the axis to a new location.
Syntax
move_axis( [ChipsId,] xval, yval [,mode])
Description
- ChipsId - an optional ChipsId structure containing values to modify the currency state for the command.
- 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_axis command moves the axis to a new position. The new location may be specified as an absolute position (default) or as relative offsets from the original location. If both an x and y axis are current, both will be moved by the command.
The following coordinate systems may be used to move an axis: FRAME_NORM, PLOT_NORM, or DATA. The system is specified by setting the coord_sys field of the optional ChipsId structure which may be passed into the move_axis routine. If a ChipsId is not provided, the default coordinate system of the axis is used.
When an axis 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 that the axis is in before applying them to the axis. This means that axes that are originally placed in normalized coordinates and get relocated using data coordinates will not be clipped if they land outside the visible data range. Conversely, axes in data coordinates which are moved using normalized coordinates to beyond the plot area will be clipped.
This command is equivalent to calling the move command with 'chips_axis' specified as the object.
Example 1
chips> move_axis(.5,.5)
Move the current axis to the center of the plot in plot normalized coordinates.
Example 2
chips> id=ChipsId() chips> id.coord_sys=FRAME_NORM chips> move_axis(id,.2,.4,1)
For an axis specified in plot normalized coordinates, adjust the x-axis position by a fifth of the frame width (0.2) and the y-axis by two fifths of the frame height (0.4).
Example 3
chips> add_axis(XY_AXIS,0,-10,10) chips> add_axis(X_AXIS,-6,-1000,1000) chips> id=ChipsId() chips> id.coord_sys=DATA chips> id.coord='plot1_ax1ay1' chips> id.axis='ax2' chips> move_axis(id,0,6)
Create a plot area with axes ranging from -10 to 10 in x and y. A second x axis is added at y = -6 in data coordinates. The move command repositions the second x axis to positive 6 in the data coordinates of the first axes.
Bugs
See the bugs pages on the ChIPS website for an up-to-date listing of known bugs.
See Also
- axes
- add_axis, bind_axes, current_axis, delete_axis, display_axis, display_major_ticks, display_minor_ticks, get_axis, get_xaxis, get_yaxis, hide_axis, hide_major_ticks, hide_minor_ticks, lin_scale, log_scale, reverse_axes, set_arbitrary_tick_positions, set_axis, set_xaxis, set_yaxis, shuffle_axis, unbind_axes

![[ChIPS Logo]](../imgs/chips_logo_navbar.gif)