| AHELP for CIAO 4.5 ChIPS v1 | bind_axes |
Context: axes |
Synopsis
Synchronizes the limits, scales, and various other attributes of two axes.
Syntax
bind_axes(ax_master, ax_slave) bind_axes(pl_master, ax_master, pl_slave, ax_slave) bind_axes(ChipsId, pl_slave, ax_slave)
Description
- ChipsId - an optional ChipsId structure containing values to specify the master plot and axis to use for binding
- pl_master - the plot which contains the axis whose values will be maintained after the bind
- ax_master - the axis whose values will be maintained after the bind
- pl_slave - the plot which contains the axis whose values will be changed after the bind
- ax_slave - the axis whose values will be changed after the bind
The bind_axes command allows a user to synchronize the limits, scale, and other properties of a pair of axes either within a single plot or in different plots within a single frame. The axes do not need to be in the same dimension - an x axis can be bound to a y axis.
Synchronized Properties
Bound axes are intended to display the same range of data. The following attributes are synchronized between bound axes: automin, automax, majortick.mode, majortick.interval, majortick.count, minortick.mode, minortick.interval, minortick.count, pad, and tickformat. In addition, internally-managed values such as data ranges are also synchronized by the bind command.
When the limits, scale, or tick mode of an axis changes, any axes bound to the modified axis are also changed.
Properties that are aesthetic in nature are not synchronized during the bind, such as colors, tick lengths, tick styles, grid styles, and tick label fonts.
Border Axes
Border axes of plots are implicitly bound to the first set of axes that are created. They may be unbound using the unbind_axes command.
The info_bound_axes command is used to display the list of currently bound axes.
Example 1
chips> erase()
chips> add_curve([14,23,53,71], [6,81,24,96])
chips> add_axis(Y_AXIS, 60, 1, 10)
chips> bind_axes("ay1", "ay2")
chips> log_scale(Y_AXIS)Create a plot which has an extra Y axis at x=60. The sexond Y axis is bound to the first so that changes to the limits, or scale, of one - such as the log_scale call - will change both simultaneously.
Example 2
chips> clear()
chips> split(2, 1, 0.1)
chips> add_curve([1,7,9], [2,3,1])
chips> current_plot("plot2")
chips> add_curve([5,10,15], [25,50,55])
chips> bind_axes("plot2","ax1","plot1","ax1")Create a pair of plots which each contain a curve. Bind the x axes of the two plots to cover the range of the curve in the lower plot ("plot2").
Example 3
chips> add_curve([14,23,53,71], [6,81,24,96]) chips> log_scale(Y_AXIS) chips> id=ChipsId() chips> id.axis="ay1" chips> bind_axes(id, "plot1", "ax1")
Bind the x axis of a plot to its y axis, using a ChipsId structure to specify the master axis.
Changes in CIAO 4.5
Manual tick positions
The behavior when binding axes with manually-selected tick positions - either through the GUI or with the set_arbitrary_tick_positions command - has been improved.
WCS axes
If a pair of WCS axes are bound together, changing the tickformat value did not always correctly update the major grid lines in CIAO 4.4. This has been fixed in CIAO 4.5.
make_script
A bug in make_script has been fixed for some visualizations using bind_axes.
Bugs
See the bugs pages on the ChIPS website for an up-to-date listing of known bugs.
See Also
- axes
- add_axis, 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, move_axis, reverse_axes, set_arbitrary_tick_positions, set_axis, set_xaxis, set_yaxis, shuffle_axis, unbind_axes

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