Questions tagged [manipulate]

Questions on the Manipulate function of Mathematica, a function that allows the interactive manipulation of certain parameters in a Mathematica expression.

Questions on the Manipulate function of Mathematica, a function that allows the interactive manipulation of certain parameters in a Mathematica expression. Questions not specifically related to Manipulate but which are about dynamic interactivity should use the tag . Questions dealing with the deployment and sharing of Manipulate objects should use the tag .

2057 questions
24
votes
3 answers

How to modularize custom controls for Manipulate?

Background: My Manipulate programs are becoming (too) long. I want to split them up in to independent modules, if at all possible. Take this program as a prototype: Manipulate[ {i, 2 i, 3 i}, {{i, i, "i="}, -11, 11, 1}, Initialization -> {i…
nilo de roock
  • 9,657
  • 3
  • 35
  • 77
18
votes
4 answers

Mathematica Manipulate with macros AND variable number of controls (persistence desired)

This post about avoiding code duplication in Manipulate helped a lot getting as far as I did. The method of "macros" outlined there works excellent, but when the number of controls is again controlled by yet another manipulate control, things get…
mathheadinclouds
  • 865
  • 5
  • 12
18
votes
2 answers

Automatically expanding sliders in Manipulate

Is there some way to have all sliders expanded by default in a Manipulator object, i.e. as if I had clicked all "+" signs?
nccc
  • 345
  • 2
  • 6
16
votes
1 answer

Putting large amounts of data inside a self-contained Manipulate

This is half tip, half question. If one tries to put a large amount of data inside the Initialization:>(code) part of a Manipulate, as one may be compelled to do in a Demonstration or where one wants to create a self-contained CDF document, I find…
Seth Chandler
  • 3,132
  • 14
  • 25
14
votes
0 answers

Initial values in Manipulate are hijacked by existing global variable values

Is the following behaviour a bug? It's the same in all versions between 9.0-10.2.0. Let's try this simple Manipulate with the initial value of a set to 1: Manipulate[Style[a, Large], {{a, 1}, 0, 2}, SaveDefinitions -> True] Now let us do the…
Szabolcs
  • 234,956
  • 30
  • 623
  • 1,263
14
votes
4 answers

How to use Locators on a graphic in a tabview

Background: I want to split graphics in a Manipulate in several parts in a tabview control. But the tabview somehow interferes with the locators as in the following simplified example: Manipulate[ TabView[{aa -> Graphics[Line[{{0, 0}, p}],…
nilo de roock
  • 9,657
  • 3
  • 35
  • 77
13
votes
2 answers

Restrict Locator to a certain graphic inside Manipulate

I would like to restrict the Locator inside Manipulate to a certain graphic. For example if I display two graphs, I would like to be able to click on the right one and use this information in other places (for example in the title and the left…
Ajasja
  • 13,634
  • 2
  • 46
  • 104
13
votes
1 answer

Manipulate not working inside DialogInput

Some controls do not appear to work with Manipulate inside a DialogInput. For example: DialogInput[{Manipulate[x, {x, {1, 2, 3}}], DefaultButton[]}] does not work, but the slider version: DialogInput[{Manipulate[x, {x, 1, 3, 1}],…
Simon Woods
  • 84,945
  • 8
  • 175
  • 324
12
votes
3 answers

What is an efficient way of selecting multiple colors via Manipulate?

Background: The following snippet is what I (intend to) use in a Manipulate form where up to 12 different colors can be selected: Manipulate[{sliderCol1}, Row[{"Kleur 1: ", ColorSlider[ Dynamic[sliderCol1] , AppearanceElements ->…
nilo de roock
  • 9,657
  • 3
  • 35
  • 77
12
votes
2 answers

"Reset" Button for Manipulate

I want to distribute a .cdf to my students wherein they manipulate 5 locators on a graph to define various shapes. The .cdf opens with the locators in a "nice" position, but of course it is very hard to return the locators, by hand, to these…
GregH
  • 1,909
  • 12
  • 25
12
votes
1 answer

Manipulate[] inside DialogInput[]

I would like to get input from an interactive dialog that uses Manipulate[]. But I find that my Manipulate[] breaks when I put it inside a DialogInput[]. So, when I try DialogInput[Manipulate[Plot[Sin[e x], {x, 0, 2 \[Pi]}], {e, 1, 10}]] the plot…
Greg P
  • 415
  • 3
  • 8
11
votes
1 answer

Can I set 'no-go' values in a Manipulate slider?

Is it possible to easily modify a Manipulate such that the slider automagically skips certain values? For example, say I am plotting an equation that's perfectly well behaved for all values of x between x=0 and x=1 except for x=0.25 where it blows…
WalkingRandomly
  • 4,107
  • 1
  • 20
  • 36
11
votes
3 answers

Is there a way to continuously update only *some* variables in Manipulate?

I have a Manipulate control, the main element of which is a single slider. Moving the one slider triggers calls to two functions - one which is evaluated very quickly, the other more slowly. I'd like to see 'live' update ( i.e.…
Cuboid
  • 1,421
  • 11
  • 15
10
votes
2 answers

Is it possible to have a plot inside a manipulate with parametric controls?

As the title suggests, I am trying to use a Plot inside a Manipulate which has its controls defined programmatically. Mathematica doesn't plot anything and gives me no error, so I don't know what else to do. I have create a simplified example of my…
RoberRM
  • 319
  • 1
  • 9
10
votes
2 answers

Label names within Manipulate with ControlType->RadioButton

I modified an example from the documentation to have a RadioButton control over a specific list of values: Manipulate[Plot[Sin[a x + b], {x, 0, 6}], {{a, 2, "Multiplier"}, {1, 2}}, {{b, 3, "Phase Parameter"}, {3, 4, 5}}, ControlType ->…
JohnD
  • 3,301
  • 3
  • 22
  • 42
1
2 3
17 18