| AHELP for CIAO 4.5 ChIPS v1 | current_label |
Context: labels |
Synopsis
Set the specified label as current.
Syntax
current_label( ChipsId ) current_label( "label_id" ) current_label( "all" )
Description
The current_label command sets the label indicated by the argument as the current label; see "ahelp currency" for general information on currency.
- ChipsId - an optional ChipsId structure containing values to modify the currency state for the command.
- label_id - identification tag given to each object that is created; use this to select a specific label.
- all - sets all labels 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_label(.35,.9,"The top of the frame.", "id=top") chips> add_label(.35,.1,"The bottom of the frame.","id=bot") chips> id.label = "top" chips> current_label(id) chips> info_current()
Two labels are created; the second label is current after it is created. The id.label command sets the label value of the ChipsId structure to the first label, then the current_label command makes that label current.
The output of info_current for this session is:
Window [win1]
Frame [frm1]
Plot [plot1]
Label [top]
Coord Sys [Plot Normalized]
Example 2
chips> add_label(.35,.9,"The top of the frame.", "id=top")
chips> add_label(.35,.1,"The bottom of the frame.","id=bot")
chips> current_label("top")Two labels are created. After the second label is created, it is current. The current_label command then sets the first label as the current label.
Example 3
chips> add_label(.4,.5,"area={\\pi}r^2")
chips> add_label(.35,.9,"The top of the frame.")
chips> current_label("all")Two labels are created. After the second label is created, it is current. The current_label command then makes all labels current.
Bugs
See the bugs pages on the ChIPS website for an up-to-date listing of known bugs.
See Also
- concepts
- chipsid, currency
- labels
- add_label, delete_label, display_label, get_label, hide_label, move_label, set_label, shuffle_label
- utilities
- load_font

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