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

learn more… | top users | synonyms

21
votes
3answers
1k views

Manipulate with a variable number of sliders

I have a function that operates on a list of variable-length $n$. I would like to create a Manipulate[] that has $n$ sliders, one for each list element, each ...
19
votes
2answers
312 views

What is the equivalent of a prototypical Manipulate in lower level functions?

Background: In the Mathematica tutorial 'Dynamic Interactivity' I read that there is a way of developing GUIs in Mathematica that do not use Manipulate. I want to ...
18
votes
6answers
3k views

Using ListPointPlot3D to simulate 2D plots moving in time

I wrote a 1D solver for the heat equation $u_t=u_{xx}$, and I can animate the solution using normal ListPlot command, where the x-axis is the rod length, and the ...
18
votes
2answers
288 views

The dangers of SaveDefinitions — should this really happen?

I have been bitten hard by SaveDefinitions -> True. I'll describe in detail what happened below. My questions are: Is this a bug? What is the most convenient ...
18
votes
1answer
520 views

What is the proper method to load a Mathematica package inside a DynamicModule

I have a DynamicModule that requires loading of Mathematica packages. The usual methods do not seem to apply (...
17
votes
3answers
693 views

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: ...
16
votes
3answers
298 views

What does None mean in a control specification for Manipulate?

I am now struggling to understand code that contains the following (simplified) Manipulate structure. ...
16
votes
4answers
522 views

In a CDF can I suppress or avoid “This file contains potentially unsafe dynamic content…”

I created a CDF to distribute to a single trusted user who both knows and trusts me and everything I make for them. I downloaded the CDF player and the CDF to one of their computers. The CDF works ...
15
votes
2answers
523 views

How can I set the speed of manipulate play button?

Can you set the speed at which a Manipulate plays when the play button is clicked?
15
votes
1answer
190 views

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 ...
14
votes
4answers
819 views

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 ...
13
votes
5answers
488 views

How are parameters evaluated for a Plot in Manipulate

I am trying to get my head around how Manipulate evaluates functions in a Plot. I have read the introduction to Manipulate, and introduction to Dynamic, but I still ...
13
votes
1answer
163 views

Manipulate not working inside DialogInput

Some controls do not appear to work with Manipulate inside a DialogInput. For example: ...
12
votes
3answers
291 views

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: ...
12
votes
3answers
424 views

Simulate a simple spinner

I'm teaching some simple ideas in probability to students in grade 7. The "spinner" below works, but I'm wondering how I could make it just a bit more realistic by having it actually "spin" around a ...
12
votes
1answer
259 views

Using a MacBook's builtin sudden motion sensor with Manipulate

With the following code I can get the value of the "Sudden Motion Sensor", which is build into MacBooks: ...
11
votes
2answers
497 views

Adding controls for multiple functions in Manipulate

I am learning Mathematica and the Image Processing functions. I have the following Manipulate procedure which works fine: ...
11
votes
1answer
183 views

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 ...
11
votes
1answer
356 views

Making a “cached” version of `Manipulate[]`?

I have a function that is a bit too slow for Manipulate[]. Right now I plan to cache outputs outside the manipulation and just have the manipulator select among ...
10
votes
3answers
1k views

RevolutionPlot3D: but NOT revolving about the z axis

I want to demonstrate generating a solid of revolution by revolving a planar region about, say, a horizontal axis. However, RevolutionPlot3D doesn't seem to have an ...
10
votes
4answers
645 views

Manipulate BarChart with Mathematica

In the following minimal working example: Manipulate[BarChart[{a,b}],{a,1,2},{b,1,2}] I'd like to be able to control the size of the bars by using some sort of ...
10
votes
3answers
178 views

Selective evaluation of blocks of code in a Manipulate

Is it possible to attach certain pieces of code to certain controls in a Manipulate? For example, consider the following Manipulate ...
10
votes
1answer
626 views

How to specify the InputField as a String in Manipulate

I'm putting together a Demonstration which utilizes a function which operates on a (manipulated) String, and I'd like the ...
10
votes
1answer
465 views

How to generate a real-time stream of data?

I'm experimenting with Inversion-of-Control (callback) programming patterns, and I would like a way to generate streams of data at specified real-time intervals. I came up with the illustrated way to ...
10
votes
1answer
338 views

Manipulate evaluation sequence

Manipulate doesn't always evaluate in the order I expect it to. What is the evaluation sequence for Manipulate and other ...
10
votes
2answers
208 views

SaveDefinitions->True changes the displayed image

I have a Manipulate[ ] that displays an image with a superimposed Locator object. It works fine when I have ...
9
votes
2answers
561 views

How can I animate a set of points imported from file?

I have an external program which generates a set of data - X points at the time t1, X points at the time t2 and so on. These points are stored in CSV file and I can change the format if necessary. ...
9
votes
2answers
258 views

“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 ...
9
votes
3answers
676 views

PolarPlot render oddities

I apologize if this is a obvious question and answer, I don't often use Mathematica to display plots or graphics in general to be honest. So, I was tutoring my cousin yesterday in relation to Polar ...
9
votes
3answers
345 views

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: ...
9
votes
3answers
357 views

Interdependent controls in Manipulate [duplicate]

Possible Duplicate: How to create interrelated sliders? locking a value when manipulating variables I need to create a Manipulate with two control ...
9
votes
2answers
201 views

How to avoid an expensive subset of a Manipulate computation when dependent variables have not changed?

I have a Manipulate where a portion of the calculation that ends up displayed is dependent on a subset of the Manipulate control ...
9
votes
2answers
144 views

How to make TraditionalForm display the same in the Manipulate output as in a notebook?

I noticed that TraditionalForm does not display as nice in the Manipulate output as in normal notebook. Is there a way to make it look the same? Here is an example, ...
9
votes
2answers
361 views

Simple problem with Manipulate and Plot

Would anyone have an idea why the following doesn't work: rule = {z -> x^2 + 2 x + y}; Manipulate[ Plot[z /. rule, {x, 0, 10}], {{y, 2, "y"}, 1, 5} ] But ...
9
votes
2answers
216 views

Dependent Manipulate sliders

I would like to use dependent sliders in Manipulate. First slider K0 should be independent and varied from ...
9
votes
2answers
161 views

How can I get Manipulator control elements to appear on one line?

By default Manipulator produced by Manipulate with Appearance -> "Open" option have two ...
9
votes
1answer
167 views

Can Manipulate controls have the option Appearance -> “Labeled” by default?

I was wondering if there's a way to tell Mathematica to use the option Appearance -> "Labeled" for all Manipulate commands by ...
9
votes
2answers
344 views

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 ...
8
votes
5answers
379 views

Manipulate Exp[I θ]+b Exp[-I θ]

I've uploaded an image showing a demonstration I'd like to create, but I definitely need help. There is a lot of talent on this list, so maybe someone can help me get started learning how to add ...
8
votes
3answers
213 views

How to allow ContinuousAction on something that is not all

I have this code: DynamicModule[{r = 1}, Grid[{{Slider[Dynamic[r]], SpanFromLeft}, {f[Dynamic[r]], g[Dynamic[r]]}}]] While I move the slider, $f$ ang $g$ are ...
8
votes
3answers
449 views

Logarithmic slider

Is it possible to create a logarithmic slider similar to this one that responds to a change of the variable value? That is, when the slider is moved, the variable value should update. When the ...
8
votes
6answers
307 views

How to format labeled Slider in Manipulate

I need increased precision of parameter 'k' in my Manipulate ...
8
votes
2answers
237 views

Localizing variables within a Manipulate

I have a notebook with several examples of very similar computations, each involving the same variable/parameter names of the ingredients used in a final ...
8
votes
2answers
121 views

Question about scoping data in a multi-level Manipulate construction

Background: In a module containing an outer / inner manipulate I select the key of data with a dropdownlist in the outer manipulate. Data is read and displayed in the inner manipulate for edit ...
8
votes
5answers
432 views

How to save Manipulate bookmarks permanently?

I would like to save current Manipulate parameter values to load them again later. Bookmarks (previously discussed here and here) work fine until the cell is ...
8
votes
2answers
396 views

What causes Manipulate to stop evaluating expressions?

I'm working on a N-body simulation within Mathematica, and currently I have something along these lines: ...
7
votes
6answers
497 views

Manipulate and Turning Expressions into Functions

I've been trying to use Manipulate to do interactive plotting, but I've been running into a few problems with saved expressions. I have an expression saved as "func" and I want to work with it and ...
7
votes
3answers
455 views

For[] or While[] can't be used inside Manipulate[]?

Here is a code sample that creates a control object which calculates the expressions inside Maniplate again and again and never stop (it's proved by the code in the ...
7
votes
3answers
304 views

1D quasicrystal: points on a line nearest to points on a lattice

I have a simple lattice / line manipulation: ...
7
votes
3answers
186 views

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 ...