Last modified: December 2013

URL: https://cxc.cfa.harvard.edu/chips/ahelp/set_cascading_property.html
Jump to: Description · Examples · Bugs · See Also


AHELP for CIAO 4.11 ChIPS v1

set_cascading_property

Context: utilities

Synopsis

Sets all occurrences of the attribute within a specified hierarchy.

Syntax

set_cascading_property([id,] start_obj, attribute, value)

Description

The function arguments.

Argument Description
id A ChipsId structure identifying the item, or a string containing the name of the object.
start_obj The type of the object at which to start the change; e.g. chips_window or chips_curve. See the Object Type section of "ahelp chipsopt".
attribute The name of the attribute to change; e.g. "color" or "thickness". The "Supported attributes" table below gives a full list.
value The new value for the attribute, as a string.

The set_cascading_property command sets all occurrances of the specified attribute to the given value. It descends down the hierarchy of current objects (or based on an optional ChipsId), beginning at the specified object type.

The start_obj parameter specifies at which object to begin the attribute changes. For instance, if the object_type is set to chips_window, the changes will be applied to all objects in the hierarchy that exist under the current window(s). The currency only applies to the start_obj itself; the currency state of the child objects is not considered.

Supported attributes

Argument Description Options Default
angle angle properties in labels and points 0:360 0.0
bgcolor background colors in windows and frames name or hex; see the Color section of "ahelp chipsopt" default: black in the ChIPS window, white on printout
color colors in frames, plots, curves, axes, lines, labels, regions, points, contours, histograms name or hex; see the Color section of "ahelp chipsopt" default: black in the ChIPS window, white on printout
fill fill for points, curve symbols, histogram symbols, and regions boolean values; see the Booleans section of "ahelp chipsopt" varies
font font for labels, axis labels, axis ticklabels, and plot titles helvetica|courier|times|greek; see the Font section of "ahelp chipsopt" helvetica
fontstyle fontstyle for labels, axis labels, axis ticklabels, and plot titles normal|bold|italic|bolditalic; see the Font Style section of "ahelp chipsopt" normal
length length of the major and minor axis tickmarks integer values 0:100 varies
thickness thickness of lines and traces 0.5 to 10.0; see the Thickness section of "ahelp chipsopt" 1

Examples

Example 1

chips> x = np.arange(-np.pi, np.pi, 0.01)
chips> add_curve(x, np.sin(x), ['symbol.color', 'plum'])
chips> add_frame(0.2, 0.2, 0.45, 0.45, ["border.visible", True])
chips> add_line([0.1,0.2,0.6,0.9], [0.3,0.8,0.9,0.1], "color=red")
chips> add_label(.5, .5, r"\sigma", "color=forest")
chips> set_cascading_property(chips_window, "color", "coral")

Create a curve and inlay a frame with a red line and green label. Change all (foreground) color attributes to "coral" in the current window.

Example 2

chips> set_cascading_property("frm1", chips_frame, "thickness", "3")

Continuing from the previous example, set the thickness of all objects in frame "frm1" to 3.


Bugs

See the bugs pages on the ChIPS website for an up-to-date listing of known bugs.

See Also

concepts
attributes, setget
utilities
get_attribute, set_attribute, set_current