Concepts: ChipsId
The ChipsId structure is used to specify the currency state and
coordinate system. It allows the user to set or modify the
currency of ChIPS by specifying the ids of the windows,
frames, plots, axes, curves, contours, histograms, labels,
lines, points, and regions that the operation should affect.
It also contains entries to specify coordinate systems and
coordinate system ids. The ChipsId is optional and is
generally the first parameter in the command.
A complete list of ChipsId members is
available below.
They are set as:
# Python
id = ChipsId()
id.window = "all"
id.curve = "crv1"
id.coord_sys = PLOT_NORM
% S-Lang
id = ChipsId;
id.window = "all";
id.curve = "crv1";
id.coord_sys = PLOT_NORM;
When a ChipsId object is passed to a command, only the
information relevant to the command is utilized. For
instance, the window and frame ids may be used when changing
the color of a frame background, but the curve id setting is
ignored. Blank entries in the ChipsId resolve to the default
determined by currency rules.
Retrieving Object Ids
The ChipsId object also provides a means of retrieving the ids
of objects created by add_<object> commands. If an
add_curve call is made when no windows exist, a window, frame,
plot, axes, and curve objects are all created. The appropriate
entries in the input ChipsId object are populated with the
object ids.
The id information may be accessed by printing the ChipsId or
via the id accessor methods, e.g. id.get_window_id(). The ids
are only set when a new instance of the object is added. If a
curve is added to an existing plot, only the curve id will
be updated in the ChipsId object.
Specifying Coordinate Systems
The coord_sys entry in the ChipsId is used to specify the
coordinate system to use when adding objects. For instance, to
add a label in plot normalized coordinates, set the coord_sys
entry to PLOT_NORM and include the ChipsId object in the
add_label call:
# Python
id = ChipsId()
id.coord_sys = PLOT_NORM
add_label(id, .5, .5, "mid")
% S-Lang
id = ChipsId;
id.coord_sys = PLOT_NORM;
add_label(id, .5, .5, "mid");
Members of the ChipsId Object
| Member |
Description |
| window |
window id to use to override currency, or the id of the last window created during an add of an object |
| frame |
frame id to use to override currency, or the id of the last frame created during an add of an object |
| plot |
plot id to use to override currency, or the id of the last plot created during an add of an object |
| axis |
axis id to use to override currency, or the id of the last axis created during an add of an object |
| xaxis |
x axis id to use to override currency, or the id of the last x axis created during an add of an object |
| yaxis |
y axis id to use to override currency, or the id of the last y axis created during an add of an object |
| curve |
curve id to use to override currency, or the id of the last curve created |
| contour |
contour id to use to override currency, or the id of the last contour created |
| histogram |
histogram id to use to override currency, or the id of the last histogram created |
| label |
label id to use to override currency, or the id of the last label created |
| line |
line id to use to override currency, or the id of the last line created |
| point |
point id to use to override currency, or the id of the last point created |
| region |
region id to use to override currency, or the id of the last region created |
| coord_sys |
coordinate system to use |
| coord |
id of data coordinate system to use |
Object Methods
| Method |
Description |
| clear |
resets all object id members to "" and coord_sys to COORD_NONE
|
| set_all |
sets all object id members to all |
| set_window_id |
sets window id to specified value |
| reset_window_id |
sets window id to specified value, resets all other object id members to "" |
| get_window_id |
retrieves window id value |
| set_frame_id |
sets frame id to specified value |
| reset_frame_id |
sets frame id to specified value, leaves window id as is, and resets all other object id members to "" |
| get_frame_id |
retrieves frame id value |
| set_plot_id |
sets plot id to specified value |
| reset_plot_id |
sets plot id to specified value, leaves window and frame id as is, and resets all other object id members to "" |
| get_plot_id |
retrieves plot id value |
| set_axis_id |
sets axis id to the specified value |
| get_axis_id |
retrieves axis id value |
| set_xaxis_id |
sets x axis id to the specified value |
| get_xaxis_id |
retrieves the x axis id value |
| set_yaxis_id |
sets y axis id to the specified value |
| get_yaxis_id |
retrieves the y axis id value |
| set_curve_id |
sets curve id to the specified value |
| get_curve_id |
retrieves curve id value |
| set_contour_id |
sets contour id to the specified value |
| get_contour_id |
retrieves contour id value |
| set_histogram_id |
sets histogram id to the specified value |
| get_histogram_id |
retrieves histogram id value |
| set_label_id |
sets label id to the specified value |
| get_label_id |
retrieves label id value |
| set_line_id |
sets line id to the specified value |
| get_line_id |
retrieves line id value |
| set_point_id |
sets point id to the specified value |
| get_point_id |
retrieves point id value |
| set_region_id |
sets region id to the specified value |
| get_region_id |
retrieves region id value |
| set_coord_sys |
sets the coordinate system to the specified value |
| get_coord_sys |
retrieves the coordinate system value |
| set_coord_id |
sets data coord system id value |
| get_coord_id |
retrieves the data coordinate system id value |
|