Last modified: December 2013

URL: https://cxc.cfa.harvard.edu/chips/ahelp/info_bound_axes.html
Jump to: Description · Examples · Bugs · See Also


AHELP for CIAO 4.11 ChIPS v1

info_bound_axes

Context: axes

Synopsis

Returns a string containing a listing of bound axes.

Syntax

info_bound_axes()
info_bound_axes(id)

Description

The function arguments.

Argument Description
id A ChipsId structure identifying the item.

The info_bound_axes command provides a means of seeing what axes are bound together in the system. The command returns a string that contains list of bound axis pairs and information about the window, frame, and plot to which each axis belongs.

The general format of the output string for each line is: the object type (Window, Frame, Plot, etc.), a space, an open square bracket, the id of the object, and a close square bracket. An indentation before the object type shows that the object belongs to the object preceding it. Indented under each object are the pairs of axes which are bound together.

The following format is used to show bound axes: plot_id:axis id -> plot_id:axis id. The plot id is the id of the plot where the axis resides and axis id is the id of the bound axis. Because axes can be bound across plots, it is not necessary for the two plot ids to be the same. The axis on the right is bound to the axis on the left, meaning that it takes on all the bind properties of the master axis. The help file for the bind_axes command ("ahelp bind_axes") lists which properties are synchronized.

Using a ChipsId argument

A ChipsId may be included to refine the context from which information will be displayed. Setting the window or frame member of a ChipsId and calling info_bound_axes with that id will return information pertaining only to the specified window or frame. (Currently this feature only works with windows and frames.)

The info command supports preferences that are not available in info_bound_axes; refer to "ahelp info" for details.


Examples

Example 1

chips> add_curve(range (10), range (10))
chips> print(info_bound_axes())
Window [win1]
  Frame [frm1]
    plot1:bx1   ->   plot1:bx2
    plot1:by1   ->   plot1:by2
    plot1:ax1   ->   plot1:bx2
    plot1:ay1   ->   plot1:by2

Print the bound axes information after adding a simple curve. The X border axes of plot1 (bx1 and bx2) are bound together as well as the Y border axes (by1 and by2). The x and y axes (ax1 and ay1) are bound to the border axes (bx2 and by2) as well.

Example 2

chips> x = np.arange(-10,10)
chips> add_curve(x, x**2, "plot.bottommargin=.5")
chips> add_plot("topmargin=.65")
chips> add_curve(x, x)
chips> bind_axes("plot2", "ay1", "plot1", "ay1")
chips> add_frame()
chips> add_axis(XY_AXIS, .5, 25, 50)
chips> print(info_bound_axes())
Window [win1]
  Frame [frm1]
    plot1:bx1   ->   plot1:bx2
    plot1:by1   ->   plot1:by2
    plot1:ax1   ->   plot1:bx2
    plot1:ay1   ->   plot1:by2
    plot2:bx1   ->   plot2:bx2
    plot2:by1   ->   plot2:by2
    plot2:ax1   ->   plot2:bx2
    plot2:ay1   ->   plot2:by2
    plot2:ay1   ->   plot1:ay1
  Frame [frm2]
    plot1:bx1   ->   plot1:bx2
    plot1:by1   ->   plot1:by2
    plot1:ax1   ->   plot1:bx2
    plot1:ay1   ->   plot1:by2

The list of bound axes from a slightly more complicated ChIPS session. Two plots in the first frame have their border axes and X/Y axes all bound. The last line under "frm1" ("plot2:ay1 -> plot1:ay1") shows the that the axis "ay1" from plot "plot2" and axis "ay1" from plot "plot1" are bound together.

Example 3

chips> strip_chart(3)
chips> add_frame()
chips> add_axis(XY_AXIS, 0, 0, 10)
chips> id = ChipsId()
chips> id.frame = "frm1"
chips> print(info_bound_axes(id))
Window [win1]
  Frame [frm1]
    plot1:bx1   ->   plot1:bx2
    plot1:by1   ->   plot1:by2
    plot2:bx1   ->   plot2:bx2
    plot2:by1   ->   plot2:by2
    plot3:bx1   ->   plot3:bx2
    plot3:by1   ->   plot3:by2
    plot1:ax1   ->   plot1:bx2
    plot2:ax1   ->   plot2:bx2
    plot3:ax1   ->   plot3:bx2
    plot1:ay1   ->   plot1:by2
    plot2:ay1   ->   plot2:by2
    plot3:ay1   ->   plot3:by2
    plot1:ax1   ->   plot2:ax1
    plot1:ax1   ->   plot3:ax1

Display the bound axes which are in the window and frame described by the ChipsId. In this case, frame is set to "frm1" and the window is empty. The output shows all the axes which are bound together when a strip chart is created.


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
coordinates
info_coordinate
depth
info_depth
utilities
highlight_object, info, info_current