Work with Dynamic Parameters (Sliders)

Top  Previous  Next

How To... > Work with Dynamic Parameters (Sliders)

slidermain

A slider is a named value, or a parameter, that you can use in any formula in your document. A change you make to the slider is immediately reflected by all the parts of your document that depend on that slider. (see Sliders.)

_img397

You might use a slider named proportion in a formula for an attribute named Votes so that changing the slider value would change the proportion of randomly generated “yes” votes in the collection of voters. Or you might use a slider named Coefficient in a function you plot on a graph. See Plot a Function You Can Vary Dynamically (Using a Slider).

1.Create a slider by dragging one from the shelf or choosing Object | New | Slider.

By default, sliders are named V1, V2, V3, and so on. It’s best to give your sliders meaningful names that reflect their role in your document. The name is selected when the slider is first created, so you can change the names by typing the new name as soon as you create it  .

2.Type a name for the slider. (Valid slider names follow the same rules as attribute names. See Tips for Naming Attributes.)
3.Use the slider’s name in the formula that you want to make dynamic. (If you don’t want to type the slider’s name, you can find slider names in the formula editor’s list under Global Values.) See Work with the Formula Editor.
4.Change the slider’s value by dragging the thumb above the axis, clicking the slider’s animation button, or editing the existing value by typing. See Animate a Slider, Change a Slider’s Animation Speed, and Restrict the Values a Slider Can Take.

Although you usually first make and name a slider, if you have a formula editor open and you decide you want to use a slider rather than a static value, you can type a reasonable name, and make the slider after you’ve accepted the formula. At first you’ll get a #Name Not Recognized# error, but when you make and rename the slider (assuming you give it the same name as you used in the formula), Fathom will recognize it and use its value for the formula’s result.

To see examples of advanced slider functionality, look at Slider Examples.ftm

Subsections

Change a Slider’s Scale

Limit the Space Used by Sliders

Define a Slider by Formula

Create and Use Sliders Whose Values Have Units

Use a Slider to Compute Things Based on a Collection

Make a Slider Do a Random Walk

Make a Non-numeric Slider and Use It in a Filter