Change the Appearance of Cases in a Collection

Top  Previous  Next

How To... > Work with Collections > Change the Appearance of Cases in a Collection

You can control the appearance of cases: the icons that represent them, their width and height, their positions, and the captions that appear under them. These controls are found in the inspector’s Display panel.

 

1.Double-click a collection to bring up its inspector, and go to the Display panel.

_img141

 

The Display panel for the Planets collection (see Display Panel)

x and y control the horizontal and vertical placement of the center of the case icon (with (0, 0) being the upper left).

image controls the appearance of the case icon (a gold ball by default).

width and height control the icon’s size.

caption controls what text, if any, appears under each case in the open collection, as well as what appears in the status bar of the Fathom window when you point at a data point in a graph.

Although you can type values directly for each case, you usually want them governed by formula.

_img15

 

Numeric attributes are in pixels. In the inspector above, notice that width and height are set to the radii of each planet and that the x and y attributes, in turn, depend on them.

The modulo function is often handy for the x attribute when you want cases ordered in rows and columns. By using sliders in these formulas, you can have cases move around in the open collection when the slider’s value is changed or when the slider is animated. See Work with Dynamic Parameters (Sliders).

You don’t need to change values or formulas manually for x and y; you can simply drag case icons around in the open collection to change their values.

You can use the switch function for image to vary images; in this example, it is done using caseIndex, but more often, it will be done using cases’ data. (For example, a switch on an attribute for die rolls can make dice appear with the face that reflects the value of the roll, or an if-statement can give you a nickel’s heads or tails.)

Fathom has dozens of built-in icons that can be accessed by formula in the formula editor’s functions list under Icon Names. The sample document FathomIconList.ftm shows them all.

You can copy an image from somewhere else, select a case in an open collection, and choose Edit | Paste As Case Icon to give cases any image you want.

To have cases appear without captions, use the formula " " (empty quotation marks).

The concat function allows you to use more than one attribute and other text as captions. For example, in a collection with two attributes, Name and Pet, you could write a formula that produces captions such as “Lauren has a parakeet” using this formula:

         concat(Name, " has a ", Pet)

You can have Fathom create a caption formula that concatenates many attributes by selecting the attributes in a case table and choosing Table | Use As Caption.

The Sample Documents folder includes many files that use the open collection to display data.