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

18
votes
5answers
1k 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 ...
11
votes
3answers
1k 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 ...
18
votes
3answers
474 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. ...
13
votes
3answers
2k 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 ...
29
votes
3answers
2k views

Manipulate with a variable number of sliders

I have a function that operates on a list of parameters of variable-length $n$. I would like to create a Manipulate[] that has $n$ sliders, one for each list ...
15
votes
1answer
460 views

Is it possible to use Begin and End inside a Manipulate?

May be someone can explain why I can't use Begin["context`"] and End[] inside a Manipulate ...
12
votes
2answers
1k 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 ...
6
votes
3answers
2k views

Manipulate using a variable defined outside of the manipulate function [duplicate]

I want to do something like this: expr := x^e; Manipulate[Plot[expr, {x, 0, 4}], {e, 1, 3}] But the plot shows up empty. Yes, it works if I do: ...
19
votes
1answer
876 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 (...
10
votes
2answers
974 views

How To interactively create a Polygon in a Graphic?

Background: suppose I start with the following (working) snippet. Manipulate[Graphics[Line[{{0, 0}, p}], PlotRange -> 2], {{p, {1, 1}}, Locator}] Ideally, I ...
6
votes
2answers
429 views

How to dynamically update Locator[] constraints?

I need to visualize Menelaus' theorem for a triangle with moving locators for each of six points. So the vertexes of the triangle can move in any possible way, and the three points on the sides of the ...
16
votes
4answers
274 views

Resizing or moving Notebook window causes Manipulate to update its argument

Bug introduced in 10.0 and fixed in 10.3.0 Check this example: Manipulate[Grid[{{RandomReal[10]}, {Plot[Sin[x], {x, 0, 2 Pi}]}}], {a, 1, 3}] As you can see, ...
6
votes
3answers
464 views

Using function with multiple definitions in Manipulate

I'm trying to use Manipulate to visually try out different values of lambda in a Box-Cox transformation. I've created a boxcox ...
16
votes
4answers
1k 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 ...
21
votes
3answers
943 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: ...
10
votes
1answer
476 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 ...
7
votes
2answers
914 views

Moving From Dynamic Module to Manipulate

In trying to implement Vitaly's suggestion about how to take control of Locator events, I have been able to make headway using ...
14
votes
3answers
1k 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 ...
6
votes
1answer
547 views

Why does Manipulate execute the expression twice?

When I execute Foobar[] in the code below and move a slider, the variable grad is printed twice. Why is this? How can I make the ...
9
votes
5answers
547 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 ...
3
votes
2answers
252 views

Problems with Manipulate (indicated by blinking output cell)

The following code produces the error message when exported to CDF in the title of this question. Although I have seen similar issues on SE, the problem is manifest by the "blinking" of the plot ...
6
votes
1answer
633 views

Enabled option for slider in Manipulate not updating dynamically

In a Manipulate expression I have a slider control which has the Enabled option ...
1
vote
1answer
91 views

Continuation of a Problem with Manipulate

For the beginning of this discussion, see: A problem with Manipulate. Now, the final use of the Initialization command doesn't protect the Global workspace. What I am discussing is not a single ...
20
votes
2answers
477 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 ...
9
votes
2answers
323 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 ...
5
votes
3answers
329 views

Manipulate changing controls

Is it possible to use Manipulate and Switch to change the Manipulate controls? ...
10
votes
2answers
545 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 ...
8
votes
2answers
3k views

Export animation of a Manipulate autorun sequence?

I've got a Manipulate that does a vector field plot. Basically a function that returns a list of Graphics objects and a couple of sliders: ...
4
votes
3answers
714 views

Constrain movement of a locator inside Manipulate

Once again a big thank you for the great help in my earlier post: Plotting function with Dynamic parameter. It totally worked out. I now have a new coding problem ...
5
votes
1answer
540 views

“Show” with Manipulate runs fine normally, but gives errors as a CDF

I've simplified my code to what can reproduce my error. Basically, I have two lines: ...
4
votes
2answers
580 views

How to make slider in/visible in Manipulate?

I need your help with making a slider invisible and visible in a Manipulate. Here is my code: ...
4
votes
4answers
618 views

How to select interactively datasets to plot with Manipulate

I'm using Manipulate to visualize three datasets: Manipulate[ListPlot[WHAT -> what], {what, {dataset1, dataset2, dataset3}}] Now with this solution I can only ...
25
votes
6answers
4k 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 y-...
18
votes
2answers
2k 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?
11
votes
2answers
445 views

Dependent Manipulate sliders

I would like to use dependent sliders in Manipulate. First slider K0 should be independent and varied from ...
10
votes
1answer
411 views

Full documentation for AppearanceElements

As explained in this solution, ListAnimate[Table[Plot[Sin[n x], {x, 0, 2}], {n, 3}]]//InputForm will allow me to view the types of appearance element for the <...
7
votes
4answers
435 views

Manipulate flickering and consuming lots of CPU

I am new to Mathematica and was experimenting with a simply problem of plotting a tangent to a curve and being able to move the point at which the tangent is drawn using ...
7
votes
2answers
396 views

saving Manipulate data inside a notebook

I want to send a few Manipulate Plots and regular plots to my advisor in a notebook. I ...
6
votes
2answers
138 views

Showing “updating…” message while Manipulate is re-evaluating

Is it possible to show a fixed text such as "updating..." instead of the last result shown, when Manipulate is re-evaluating an expression (in a slow evaluation ...
6
votes
3answers
550 views

Unexpected Setter Bar Behavior when Manipulate Nested in Dynamic Module

Consider this code: DynamicModule[{x, y}, x[t_] := t^2 + 5; y[t_] := t^3 + 5; Manipulate[Plot[fcn[t], {t, -5, 5}], {fcn, {x -> "Square", y -> "Cubic"}}]] ...
4
votes
1answer
129 views

What are Epilog x-Axis Positions In BoxWhiskerChart (with BarSpacing option)?

I have a dataset that has a number of groups with overlapping sets. There is a point in the group within the intersection of the sets that I want to highlight by placing a marker of that point between ...
4
votes
3answers
249 views

Is there something wrong with this piece of code involving Manipulate?

I am playing around with the Manipulate sentence. I think the following code is right, and actually Mathematica 9.0 doesn't return any error message, but I am ...
4
votes
2answers
2k views

Combining manipulated plots

Let's say I have two manipulated plots: Manipulate[Plot[Sin[a x], {x, 0, Pi}], {a, 0, 10}] Manipulate[Plot[Cos[b x], {x, 0, Pi}], {b, 0, 10}] How can I create a ...
4
votes
4answers
349 views

Change all Options of Plot Dynamically

I am trying to make a series of changes in the appearance of the Plot of some function. I am trying to use Manipulate for my experiments. I tried to change the following code ...
3
votes
2answers
407 views

Why does the syntax highlighter color a local symbol red inside DynamicModule?

I am adding a Module inside DynamicModule here is an example (thanks to @rm-rf for this simple example) ...
2
votes
1answer
468 views

How to apply a free-form input Function using InputField

I am trying to take a free-form input Function to create a list using NestList. ...
1
vote
1answer
832 views

Increasing number of decimal places in Manipulate input

I've made a Manipulate app. in Mathematica where I vary the value of a function f(a) by varying the parameter a. However, I seem to only be able to edit my input for a for a value up to 5 decimal ...
4
votes
1answer
253 views

Manipulate not showing anything

This works: Manipulate[Plot[2*x + 3*y, {x, 3, 4}], {y, 3, 4}] But this doesn't ...
4
votes
0answers
272 views

DynamicModule, SaveDefinitions and global functions

Unfortunately, I had not checked stackoverflow, because there, the exact same behavior was already reported. Please see the Q&A "SaveDefinitions considered dangerous". Up-front, I'm on Ubuntu ...
4
votes
1answer
182 views

ControlType -> None Vs. Module inside Manipulate (i.e. making everything local)

I'm building a program on another one made available in the Wolfram Demonstration Project. I've noticed that in the original code (working flawlessly) many variables were made local inside the ...