Questions tagged [manipulate]

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

Filter by
Sorted by
Tagged with
44 votes
3 answers
4k 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 ...
Joseph O'Rourke's user avatar
32 votes
6 answers
4k 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 ...
ShaunH's user avatar
  • 807
30 votes
5 answers
7k views

Make a beautiful Moiré effect

How do I make the following Moiré pattern? I tried: ...
vito's user avatar
  • 8,958
30 votes
2 answers
4k 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?
M.R.'s user avatar
  • 31.4k
29 votes
6 answers
6k 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-...
Nasser's user avatar
  • 142k
24 votes
4 answers
1k views

Change the color of a Locator in a Manipulate

How can I change the color of a Locator in a Manipulate? As an example, consider the following. ...
Mark McClure's user avatar
  • 32.4k
24 votes
3 answers
1k 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: ...
nilo de roock's user avatar
23 votes
2 answers
1k views

Better way to visualize cylinder puzzle solution

The above puzzle has been a recent source of amusement in my clique. I decided to provide a visualization to motivate solution (here): My code: ...
ubpdqn's user avatar
  • 60k
23 votes
2 answers
655 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 ...
Szabolcs's user avatar
  • 234k
23 votes
1 answer
2k 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 (...
Nothingtoseehere's user avatar
22 votes
3 answers
4k 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 ...
Szabolcs's user avatar
  • 234k
22 votes
2 answers
530 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 ...
nilo de roock's user avatar
19 votes
3 answers
760 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. ...
David's user avatar
  • 14.9k
19 votes
3 answers
6k views

The most simple Manipulate freezes the notebook on v10.1

I realize this won't be a particularly clear question. As I'm not able myself to find a pattern for the problem I'm talking about I won't be able to give enough informations to make it fully ...
glS's user avatar
  • 7,593
18 votes
2 answers
2k views

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's user avatar
  • 345
18 votes
4 answers
2k 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 ...
mathheadinclouds's user avatar
18 votes
1 answer
682 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 ...
Nasser's user avatar
  • 142k
18 votes
2 answers
7k views

Manipulate to GIF

I am using the following example code to export Manipulate to GIF: ...
mrz's user avatar
  • 11.7k
18 votes
4 answers
2k 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 ...
Jagra's user avatar
  • 14.3k
17 votes
3 answers
3k views

Plots quality during manipulation

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 ...
Sonryell's user avatar
  • 173
16 votes
5 answers
1k views

How to create a spiral using Golden Triangles

Working with students in a pre-calculus class, an application of the sine law. They are working on a question that has them create a Golden Triangle (A golden triangle is an isosceles triangle in ...
Tom De Vries's user avatar
  • 3,758
16 votes
3 answers
3k views

Particles bouncing in a 3D box

I made this Manipulate code which shows a pack of particles randomly moving inside a box. It has a huge performance issue. What should be the best way in doing "...
Cham's user avatar
  • 3,989
16 votes
4 answers
476 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, ...
Basheer Algohi's user avatar
16 votes
2 answers
4k 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 ...
Jaleno's user avatar
  • 163
16 votes
2 answers
1k views

How can I create an interactive ColorFunction using Manipulate?

I am trying to specify my own colors and scaling for the ColorFunction in ListDensityPlot. I have several lists of 2D values ...
infinity's user avatar
  • 395
16 votes
3 answers
1k 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 ...
Tom De Vries's user avatar
  • 3,758
16 votes
2 answers
900 views

Avoiding slow evaluations in Manipulate when combining graphics with Show

I want to figure out how to combine several graphics in manipulate such that only the ones that change are recomputed. I looked into the tutorials on Advanced Manipulate, but couldn't figure out how ...
Beginner's user avatar
  • 443
16 votes
1 answer
1k 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 ...
Brian B's user avatar
  • 1,553
16 votes
1 answer
249 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 ...
Seth Chandler's user avatar
15 votes
3 answers
4k 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 ...
JohnD's user avatar
  • 3,301
15 votes
2 answers
1k views

For a better animation of the solution from NDSolve

I obtained a numerical solution from the following code with NDSolve ...
lxy's user avatar
  • 165
15 votes
6 answers
2k views

How to set precision and format labeled Slider in Manipulate?

For my calculations, I need increased precision of parameter k in my Manipulate: ...
Cendo's user avatar
  • 681
15 votes
3 answers
4k views

ListLogLinearPlot logarithmic axis tickmarks

When using ListLogLinearPlot the abscissa labels every other decade. Is there a way to tell Mathematica to label each decade? I need to use this inside ...
CaptanFunkyFresh's user avatar
15 votes
1 answer
3k 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 ...
Eli Lansey's user avatar
  • 7,459
15 votes
2 answers
381 views

SaveDefinitions->True changes the displayed image

Bug introduced in 9.0.1 or earlier and fixed in 10.4.0 I have a Manipulate[ ] that displays an image with a superimposed Locator...
bill s's user avatar
  • 68.8k
15 votes
1 answer
5k views

How to visualize a random forest classifier?

I'd like to recreate this visualization (from python) in Mathematica: I'm not sure how to extract the decision boundaries from a classifier with "Method" set to "RandomForest". Here's the code: <...
M.R.'s user avatar
  • 31.4k
15 votes
1 answer
716 views

Evaluation indicator for a notebook

I have a GUI with a number of TabView and other Manipulate controls. Sometimes clicking from one tab view to the other can take ...
BlueMac's user avatar
  • 711
14 votes
4 answers
718 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: ...
nilo de roock's user avatar
14 votes
3 answers
1k 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 parameters ...
Simon Woods's user avatar
  • 84.9k
14 votes
2 answers
665 views

How to make an Epilog moveable with drag and drop

I would like to make an Epilog moveable. For example, the following code generates a Manipulate with a framed pane containing some notes. I would like the user to be able to move those notes anywhere ...
B flat's user avatar
  • 5,513
14 votes
3 answers
1k views

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

I have a simple lattice / line manipulation: ...
martin's user avatar
  • 8,668
14 votes
1 answer
2k 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 ...
Stan's user avatar
  • 941
14 votes
2 answers
840 views

Dynamic graphics are less responsive inside a Manipulate

I have some code which displays a GraphPlot and allows the user to click on any vertex in the graph to display some information about that vertex in a popup window. ...
Simon Woods's user avatar
  • 84.9k
14 votes
0 answers
590 views

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 ...
Szabolcs's user avatar
  • 234k
13 votes
6 answers
2k views

How to plot a bicycle with square wheels

I want to draw a bicycle with square wheels similar to this picture, but I can't plot the trajectory along the curve. enter link description here ...
A little mouse on the pampas's user avatar
13 votes
3 answers
2k views

Interactive Mandelbrot Zoomer?

I want to combine Manipulate with ManbelbrotSetPlot just to get Mathematica to give me a quick and dirty Mandelbrot Zoomer. I want to be able to single/double click on a section, and have it zoom in ...
silvascientist's user avatar
13 votes
3 answers
2k views

Generate random walk on a graph

I have a graph with 100 nodes and 200 edges. How can I generate a random walk in it and animate it?
nasha amalina's user avatar
13 votes
3 answers
372 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 ...
WalkingRandomly's user avatar
13 votes
2 answers
6k 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: ...
Peeter Joot's user avatar
  • 6,398
13 votes
1 answer
2k views

Placing Manipulate controls in multiple columns

I have a Manipulate construct with a square Graphic on the left side and all the controls placed on the right side. There are so ...
einbandi's user avatar
  • 4,024

1
2 3 4 5
42