| AHELP for CIAO 4.5 ChIPS v1 | current_axis |
Context: axes |
Synopsis
Set the specified axis as current.
Syntax
current_axis( ChipsId ) current_axis( "axis_id" ) current_axis( "all" )
Description
The current_axis command sets the axis indicated by the argument as the current axis; see "ahelp currency" for general information on currency.
- ChipsId - an optional ChipsId structure containing values to modify the currency state for the command.
- axis_id - identification tag given to each object that is created; use this to select a specific axis.
- all - sets all axes to be current.
Use the info_current command to retrieve a list of all the current items in the ChIPS session, as shown in Example 1.
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

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