Synopsis
Returns a string containing a listing of available data coordinate systems.
Syntax
info_coordinate() info_coordinate(id)
Description
The function arguments.
Argument | Description |
---|---|
id | A ChipsId structure identifying the item. |
The info_coordinate command provides a means of seeing what data coordinate systems exist, where they reside, and the ids associated with them. A data coordinate system is created for each pair of X/Y axes. The basic info_coordinate command returns a string with all data coordinate systems which exist in the system. The window, frame, plot, and axes are include in order to distinguish where the coordinate system resides and with what object it is associated.
The general format of the output string for each line is: the object type (Window, Frame, Plot, Coord Sys Id, 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. The axes which define the data system are always listed on the two lines following the Coord Sys ID.
Window [win1] Frame [frm1] Plot [plot1] Coord Sys ID [plot1_ax1ay1] X Axis [ax1] Y Axis [ay1]
In this example, frame 'frm1' belongs to window 'win1', plot 'plot1' belongs to frame 'frm1', and X axis 'ax1' and Y axis 'ay1' belong to plot 'plot1'. The data system 'plot_ax1ay1' is associated with plot 'plot1'; it is defined by axes 'ax1' and 'ay1'.
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_coordinate 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_coordinate; refer to "ahelp info" for details.
Examples
Example 1
chips> add_curve(range (10), range (10))
chips> print(info_coordinate()) Window [win1] Frame [frm1] Plot [plot1] Coord Sys ID [plot1_ax1ay1] X Axis [ax1] Y Axis [ay1]
Print the info_coordinate results after adding a simple curve. The data coordinate system is defined by axes ax1 and ay1.
Example 2
chips> add_histogram([1,2,3], [4,5,6]) chips> add_axis(XY_AXIS, 1, 0, 10, "coordsys=PLOT_NORM *.color=red") chips> add_label(1,8, "Curve and Histogram") chips> add_frame() chips> add_label(.1, .9, 'New Curve') chips> x = np.arange(0, 2*np.pi, 0.1) chips> add_curve(x, np.sin(x), "plot.topmargin=.3")
chips> print(info_coordinate()) Window [win1] Frame [frm1] Plot [plot1] Coord Sys ID [plot1_ax1ay1] X Axis [ax1] Y Axis [ay1] Coord Sys ID [plot1_ax1ay2] X Axis [ax1] Y Axis [ay2] Coord Sys ID [plot1_ax2ay1] X Axis [ax2] Y Axis [ay1] Coord Sys ID [plot1_ax2ay2] X Axis [ax2] Y Axis [ay2] Frame [frm2] Plot [plot1] Coord Sys ID [plot1_ax1ay1] X Axis [ax1] Y Axis [ay1]
The info_coordinate displayed from a slightly more complicated ChIPS session with multiple coordinate systems across different frames and plots. The first plot lists four data systems, one for each axis pairing. Listed underneath each data system is the pair of axes which define it.
Example 3
chips> id = ChipsId() chips> add_curve(id, range (10), range (10)) chips> add_axis(X_AXIS, 5, 500, 1000) chips> add_frame() chips> x = np.arange(0, 2*np.pi, 0.1) chips> add_curve(x, np.cos(x))
chips> print(info_coordinate(id)) Window [win1] Frame [frm1] Plot [plot1] Coord Sys ID [plot1_ax1ay1] X Axis [ax1] Y Axis [ay1] Coord Sys ID [plot1_ax2ay1] X Axis [ax2] Y Axis [ay1]
Display the data systems which are in the window and frame described by the ChipsId, namely 'win1' and 'frm1'. The ChipsId is populated by passing it to the add_curve command.
Bugs
See the bugs pages on the ChIPS website for an up-to-date listing of known bugs.
See Also
- axes
- info_bound_axes
- chips
- chips, chipsgui, chipsrc, show_gui
- concepts
- aspectratio, attributes, chipsid, chipsopt, colors, coordsys, currency, depthcontrol, entitycreation, preferences, setget
- depth
- info_depth
- utilities
- highlight_object, info, info_current