Questions relating to the dynamic family of functions in Mathematica, such as Dynamic, DynamicModule and Manipulate.

learn more… | top users | synonyms

106
votes
1answer
21k views

Mathematica Minecraft

Some time ago I asked myself: with all these great graphics and interactive capabilities of Mathematica, what kinds of 3D games can be implemented in it? And the answer which came to mind is ...
64
votes
2answers
4k views

How to manipulate 2D plots?

When it comes to visual analysis, large datasets or data with intricate internal details often makes plotting in 2D useless, as the outcome is either just a fraction of the full dataset, or no details ...
35
votes
3answers
722 views

How can I set up a versioning system within a notebook?

Since the Frontend crashes a lot, for important work it would be nice to have the notebook automatically branch and save itself every so many minutes. For instance, commands like ...
32
votes
2answers
571 views

How safe is the use of Block and Internal`InheritedBlock

For many questions on this site answers are given which suggest to use Block and, especially for more advanced topics, ...
30
votes
2answers
783 views

Documentation searches hang frequently: Anyone else dealing with this?

I've been struggling with a number of hangs, dynamic timeouts, and outright crashes when using the search/documentation center in version 9. I've tried uninstalling/reinstalling and clearing ...
29
votes
9answers
4k views

How to create animated snowfall?

Well, the title is self-explanatory. What sorts of snowfall can we generate using Mathematica? There are two options I suggest to consider: 1) Continuous GIF animations with smallest possible number ...
27
votes
3answers
2k views

How to create a progress bar?

I would like to create a progress bar tool that allows me to see how my computations are going. I found answers to this question on many sites, I even found a package for it ( ...
26
votes
1answer
293 views

Quickly look-up usages, options and attributes of symbols

When I'm writing code in the front-end, I find myself very often looking up the list of options of a symbol over and over again in the documentation center. In most cases you find there a list of ...
25
votes
4answers
865 views

Question about collections of custom GUI controls for Mathematica

Background: I have only recently begun programming GUIs in Mathematica, so I have a continuous need for custom controls. I needed a scrollable list control and with the help of Google I found a ...
22
votes
1answer
443 views

How do I find all the possible events that work with EventHandler?

The EventHandler documentation, More Information section, lists 5 mouse events: ...
21
votes
2answers
643 views

What are the most common (usual) ways to make palettes with non-trivial functionality?

What are the best (most robust and most convenient) ways to create palettes that can be installed permanently (using Palettes -> Install Palette...) and are safe ...
20
votes
3answers
715 views

Does Mathematica have a built-in date picker?

Does Mathematica have an interactive date input control that lets the user choose a date by browsing to a calendar view and returning the selected date as a date list? For example, something like the ...
20
votes
2answers
756 views

Why animator smoothes dynamic updates, or how to make pacman drink beer

How could I make a pacman drink beer in Mathematica? This is what I have so far ...
19
votes
2answers
495 views

Dynamically splitting Disks with Mouseover

I've recently stumbled across this site: Koalas to the Max, and the first thought that came to my mind was "I want to recreate this with Mathematica". As a first step I tried to create a ...
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
4answers
334 views

How to Initiate a queued evaluation from a Dynamic GUI without using a Button

I have a Dynamic-based GUI, and one part of it will kick off a calculation that could take longer than the default 5-second dynamic timeout. I know that ...
18
votes
3answers
572 views

LocatorPane and PlotRange

Consider the following snippet from the documentation on LocatorPane ...
18
votes
3answers
1k views

Generating graphs interactively (GUI)

I want to create graphs interactively using a GUI. I thought of using a ClickPane[] environment. The code I have (in part borrowed from the Documentation) works ...
18
votes
1answer
195 views

“With” as part of the “Dynamic Interactivity Language”

I noticed that in Mathematica's Function Navigator With is listed as being part of the "Dynamic Interactivity Language". It is not the first (or even the fourth, ...
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 (...
18
votes
1answer
448 views

How can I effectively performance-profile Dynamics?

How to optimize performance-wise a complex dynamic expression (like a GUI) with lots of dynamically updated components, which require different update-frequencies? I was hesitant to ask this question ...
17
votes
4answers
322 views

How to create Locator[] hierarchies?

I'd like to 'parent' Locators to one another, ideally organized in any arbitrary tree. The simplest case: If I have two Locators, A and B, then moving A will move both together, but moving B will ...
17
votes
3answers
356 views

Using Refresh[..] with TrackedSymbols

This is a very basic question, but I don't understand the following behavior. The usage to Refresh reads represents an object whose value in a Dynamic should be ...
17
votes
1answer
313 views

How can I interrupt Speak?

I want to use an event handler to stop speaking: Speak[ExampleData[{"Text", "DonQuixoteISpanish"}]] The only way I can stop this is by restarting mathematica!
16
votes
4answers
394 views

How can I make an InputField with a proper newline/carriage return?

The return key does not work as expected in an InputField, how can I overcome this?
16
votes
3answers
487 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. ...
16
votes
2answers
597 views

Interactively extract points from a plot (ListPlot or SmoothDensityHistogram)

Is there a way to dynamically define a polygon on a plot (I'm working with ListPlot and SmoothDensityHistogram) to select a ...
16
votes
3answers
340 views

How to improve this code for exploring large matrices?

What I'm actually trying to do is to elaborate this question. I'd like to use Pane with scrollbars enabled to explore large (sparse) matrices like this one: Here ...
16
votes
1answer
559 views

How can I share objects with dynamic content with non-Mathematica users?

Often when I construct some cool Manipulate[] function, I would like to share it with others—non-Mathematica users. Some software, notably Cinderella, ...
16
votes
1answer
570 views

Module vs DynamicModule for a dynamic variables in a grid. || Spelling Bee

When my daughter asked me help with her spelling homework, for me the obvious thing to do was to write a Mathematica program for it. The words: ...
16
votes
1answer
484 views

Mouse motion heat map - live visualization and analysis

Mouse motion heat map is an great way to study spatial attention distribution, styles of movement, reaction, etc. I am trying to design a code that visualizes such heat map. The requirements: 1) It ...
16
votes
1answer
458 views

Manipulating a continuous stream of sounds

I need some audio-feedback when a locator is moved on a surface. I have the following code that produces a beep every time the dynamic controller is interacted with such that the pitch of the sound ...
16
votes
3answers
527 views

Detecting KeyUp events

Is there a way to detect when a key is released, similar to EventHandler[InputField[], {"KeyDown", "k"} :> Print["k pressed"]] It seems such detection isn't ...
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
3answers
336 views

Practical uses of DynamicWrapper

I am looking for practical uses of the function DynamicWrapper . I read documentation and know whatever it says. I would appreciate a clear example of a useful ...
15
votes
3answers
335 views

Creating a notebook that has cells of a certain style password protected

I am teaching students how to use Mathematica. I want to create a problem set that has cells with a certain style (probably Input or some new style that is a variant of Input) locked down so that the ...
14
votes
3answers
646 views

How can I set the view vector in a 3D scene by tracking my face's position?

Faking 3D with 2D tracking data is something that I've long wanted to implement for use with my front facing laptop camera. A first step to solving this would be dynamically setting the viewpoint ...
14
votes
1answer
203 views

Dynamic and LibraryLink: dynamic visualization of a simulation

I am asking this question to save some time and I am expecting answers only from people who have tried something like this before. (I realize that I could just try it and see if it works, but that ...
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
3answers
663 views

How can locators be added to the points on a 3D grid?

Here is a pared down example of some 3D data that I want to make dynamic and add locators to each set of points. Is that possible? ...
13
votes
4answers
320 views

Button evaluation inside DynamicModule

Someone know why this Button works when clicked: ...
13
votes
4answers
434 views

Is it possible to select outliers on a graph and determine the index of the outliers?

I have a large data set of experimental data for which I have determined a theoretical fit. However, for some of the experimental data I took, there was systematic error, leading to the data deviating ...
13
votes
1answer
211 views

Why does a variable become real when using the second argument of Dynamic?

Version 9, on Windows 7. Please compare these 2 very simple examples Manipulate[ x, Row[{Manipulator[Dynamic[x], {0, 10, 1/100}]}], {{x, 1}, None} ] and ...
13
votes
1answer
328 views

How do I stop my joystick from rotating a 3D graphic?

I am trying to use Mathematica to illustrate mixed strategies in Game Theory. I want my students to be able to use common joysticks as controllers. What I find, however, is that in addition to doing ...
13
votes
1answer
424 views

Unique[] symbol not properly tracked

In a nutshell, why does this work (change y and see how the value updates) ...
13
votes
0answers
338 views

How can I trace a functional expression's evaluation visually?

Ok, so the goal is to visualize the execution of this expression foo /@ {3 + 1, bar /@ {1 + 2, {4 + 7}}} in the following fashion using nested rectangles with ...
12
votes
5answers
675 views

Using DynamicModule variables outside the DynamicModule

Take the following example for hiding/showing a notebook through a Checkbox: ...
12
votes
3answers
251 views

In InputField, how to prevent Shift-Return from generating a new cell?

When running the following in a notebook (not a deployed CDF file), it can sometimes be annoying that accidentally pressing Shift-Return breaks out of the user ...
11
votes
3answers
327 views

Why do buttons with ChoiceDialog freeze the front end?

Pressing the button below will freeze my front end. An unpainted white dialog box comes up, then it completely freezes, and I need to forcibly kill the front end. CPU usage stays at zero during ...
11
votes
2answers
330 views

Soft-Match String Comparison

I have a list of names in which I would like to check for duplicates. However, within the list, the duplicates may not show up as exact duplicates of each other - for instance, ...