Synopsis
Set the specified axis as current.
Syntax
current_axis(id)
Description
The function arguments.
Argument | Description |
---|---|
id | A ChipsId structure identifying the item, or a string containing the name of the object. |
The current_axis command sets the axis indicated by the argument as the current axis; see "ahelp currency" for general information on currency.
Use the info_current command to retrieve a list of all the current items in the ChIPS session, as shown below.
Examples
Example 1
chips> id = ChipsId() chips> add_plot(.6, .6, .9, .9) chips> add_curve([-4,0,4],[0,5,10]) chips> add_plot() chips> add_curve(np.arange(-4,4),np.arange(-4,4)*np.arange(-4,4)) chips> current_plot("plot1") chips> id.axis = "ay1" chips> current_axis(id) chips> info_current()
Two plots are created, each containing a curve, then the first plot is set as current. The id.axis command sets the axis value of the ChipsId structure to the y-axis of the first plot, then the current_axis command makes that axis current.
The output of info_current for this session is:
Window [win1] Frame [frm1] Plot [plot1] X Axis [ax1] Y Axis [ay1] Curve [crv1] Coord Sys [Data] Coord Sys ID [plot1_ax1ay1]
Example 2
chips> id = ChipsId() chips> add_plot(.6, .6, .9, .9) chips> add_curve([-4,0,4],[0,5,10]) chips> add_plot() chips> add_curve(np.arange(-4,4),np.arange(-4,4)*np.arange(-4,4)) chips> current_plot("plot1") chips> current_axis("all")
Two plots are created, each containing a curve, then the first plot is set as current. The current_axis command then sets all axes in that plot as current.
Example 3
chips> id = ChipsId() chips> add_plot(.6, .6, .9, .9) chips> add_curve([-4,0,4],[0,5,10]) chips> add_plot() chips> add_curve(np.arange(-4,4),np.arange(-4,4)*np.arange(-4,4)) chips> current_plot("all") chips> current_axis("all")
Two plots are created, each containing a curve, then all plots are made current. The current_axis command then sets all axes in all plots as current.
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, 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
- concepts
- chipsid, currency