1
$\begingroup$

I want to generate a different random initial condition for rule 110 using a Button for Manipulate, not a slider. How can I make the slider invisible here? I tried specifying ControlType -> None, and made the Button disappear.

 Manipulate[ SeedRandom[seed]; ArrayPlot[CellularAutomaton[110, RandomInteger[1, 600], 700]], { seed, 1, 1000, 1}, Button["Randomize initial condition", If [seed < 1000, seed = seed + 1, seed = seed - 1]]] 
$\endgroup$
3
  • 1
    $\begingroup$ Did you do it like this?: {seed, 1, 1000, 1, ControlType -> None} $\endgroup$ Commented Jan 25, 2015 at 2:15
  • $\begingroup$ No, I tried: Manipulate[ SeedRandom[seed]; ArrayPlot[CellularAutomaton[110, RandomInteger[1, 600], 700]], { seed, 1, "", 1000, 1}, Button["Randomize initial condition", If [seed < 1000, seed = seed + 1, seed = seed - 1]], ControlType -> None], and thanks, that works $\endgroup$ Commented Jan 25, 2015 at 2:18
  • $\begingroup$ Done. And you're welcome! $\endgroup$ Commented Jan 25, 2015 at 2:59

1 Answer 1

2
$\begingroup$

To have no control for seed to appear, apply the option ControlType -> None to the variable:

 Manipulate[ SeedRandom[seed]; ArrayPlot[CellularAutomaton[110, RandomInteger[1, 600], 700]], {seed, 1, 1000, 1, ControlType -> None}, Button["Randomize initial condition", If [seed < 1000, seed = seed + 1, seed = seed - 1]]] 
$\endgroup$
2
  • 1
    $\begingroup$ Note also that {seed, 1, 1000, 1, None} will suffice. $\endgroup$ Commented Jan 25, 2015 at 5:11
  • $\begingroup$ @MikeHoneychurch Yes, an explanation may be found in my answer here, which was a question prompted by my use of it here. At some point since that time, I decided to use the longer form, at least on this site, because it occurs in the documentation and is more readable. $\endgroup$ Commented Jan 25, 2015 at 12:40

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.