|
|
|
|
SynopsisSynchronizes the limits, scales, and various other attributes of two axes. Syntaxbind_axes(ax_master,ax_slave); bind_axes(pl_master, ax_master, pl_slave, ax_slave); bind_axes(ChipsId, pl_slave, ax_slave); Description
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 PropertiesBound 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 AxesBorder 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 3chips> 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. BugsSee the bugs pages on the ChIPS website for an up-to-date listing of known bugs. |
![]() |
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-2004. All rights reserved. |