As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [dynamic]

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

Filter by
Sorted by
Tagged with
171 votes
1 answer
30k 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 ...
faleichik's user avatar
  • 12.6k
145 votes
3 answers
22k 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 ...
István Zachar's user avatar
70 votes
2 answers
2k views

Guidelines for planning custom GUI in Mathematica

This post is here to save your time during GUI development in Mathematica. And one way to do this is to know where limits are and to be aware of features that are awaiting. Background Usually I don't ...
Kuba's user avatar
  • 135k
57 votes
2 answers
2k 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, ...
Albert Retey's user avatar
  • 23.5k
55 votes
3 answers
14k 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 ( http://www.physics.ohio-...
Eliyah Uribe's user avatar
42 votes
9 answers
18k 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 ...
faleichik's user avatar
  • 12.6k
42 votes
3 answers
2k 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 StartSavingCopies[5]...
M.R.'s user avatar
  • 30.9k
41 votes
4 answers
3k 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 ...
sakra's user avatar
  • 5,040
40 votes
4 answers
1k views

What is the difference between Dynamic[x] and Dynamic[ h[x] ] for DynamicModule variables?

Bug introduced in 9.0 or earlier and persisting through 12.0 In 11.3 it is even worse. An example from the accepted answer with a Slider is now broken too: ...
Kuba's user avatar
  • 135k
39 votes
2 answers
2k views

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

The EventHandler documentation, More Information section, lists 5 mouse events: ...
Mike Honeychurch's user avatar
38 votes
5 answers
4k 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 ...
CHM's user avatar
  • 3,385
37 votes
4 answers
2k 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 ...
nilo de roock's user avatar
37 votes
2 answers
1k 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 ...
telefunkenvf14's user avatar
36 votes
4 answers
2k 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 ...
Szabolcs's user avatar
  • 231k
34 votes
1 answer
532 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 ...
halirutan's user avatar
  • 112k
34 votes
1 answer
659 views

The paradigm behind Dynamic and related functionality

Dynamic and the related functionality strikes me as a very unique way to build quick and dirty personal GUIs which are great for experimentation. I suspect that ...
Szabolcs's user avatar
  • 231k
34 votes
0 answers
749 views

How to design CloudObjects with reasonable CloudCredit costs

Note: I originally thought to post this as a non-answer/extended comment to this question; however I feared that I would end up hijacking the original question. It is likely a duplicate with the ...
bobthechemist'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
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
  • 30.9k
30 votes
2 answers
1k views

UI performance with large image data

Some days ago, I built a small program for some of my colleagues to analyse cell images. One minor part of the user interface was the selection of the region of interest. The images are large and need ...
halirutan's user avatar
  • 112k
30 votes
1 answer
715 views

Minesweeper: How to Dynamic a lot of graphics with high-speed?

Recently I've implemented Minesweeper in Mathematica. ...
Apple's user avatar
  • 3,643
28 votes
5 answers
3k 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 ...
jVincent's user avatar
  • 14.7k
27 votes
2 answers
1k 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 ...
Rojo's user avatar
  • 42.2k
26 votes
1 answer
1k views

How to monitor the process of Neural Network Learning

Main Problem I'm exploring the neural network in v11 and I would like to monitor the training progress in my own way instead of Mathematica's default way. So my question is, how to do this ...
Wjx's user avatar
  • 9,373
25 votes
4 answers
886 views

What is the point of Refresh if Dynamic has an UpdateInterval option?

I haven't found an example where I can't get rid of Refresh[]: ...
Tom Wellington's user avatar
25 votes
4 answers
1k 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 ...
Joel Klein's user avatar
  • 5,175
25 votes
1 answer
5k views

How to draw an interactive, mouse clickable, 3D Bloch sphere?

A 3D Bloch (Poincaré) sphere is nicely shown in this wolfram demonstration. However, in that example, it is not possible to mouse select a point on the sphere and directly get the corresponding qubit ...
glS's user avatar
  • 7,513
25 votes
1 answer
801 views

How to improve these WASD + mouse look 3D controls?

Insipred by this question and the corresponding answer I've written a code for full-screen exploration of 3D scenes using standard WASD and mouse look controls. Here it is. ...
faleichik's user avatar
  • 12.6k
25 votes
1 answer
920 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 ...
M.R.'s user avatar
  • 30.9k
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.2k
24 votes
2 answers
518 views

Framework behind Graph plots. DynamicNamespace and friends

As shown in DynamicLocation usage, we can use it to quickly create very nice functionality, that it to refer to graphics' primitives relative coordinates without calculations of boundary etc. As ...
Kuba's user avatar
  • 135k
24 votes
1 answer
919 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 ...
István Zachar's user avatar
23 votes
5 answers
2k 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?
M.R.'s user avatar
  • 30.9k
23 votes
3 answers
1k views

Button action monitored with progress bar

Let's say you have a palette with a button that has to do some time-consuming task when clicked: ...
halirutan's user avatar
  • 112k
23 votes
1 answer
1k 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
1k 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 ...
halirutan's user avatar
  • 112k
22 votes
3 answers
3k 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
  • 231k
22 votes
2 answers
529 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
22 votes
3 answers
1k views

LocatorPane and PlotRange

Consider the following snippet from the documentation on LocatorPane ...
nilo de roock's user avatar
22 votes
3 answers
690 views

Is there a better way to repeatedly add elements to a Graphics(Box)?

Consider simple example where a set of points is generated and some are displayed. ...
Kuba's user avatar
  • 135k
21 votes
5 answers
2k views

Using DynamicModule variables outside the DynamicModule

Take the following example for hiding/showing a notebook through a Checkbox: ...
Szabolcs's user avatar
  • 231k
21 votes
3 answers
1k views

How to write a drag-n-drop reorderable gui?

Most modern GUI building libraries (e.g. cocoa) support this basic operation in tables or lists: reordering items with a mouse. For example, the drag-and-drop of items in a MacOS finder or app window: ...
user5601's user avatar
  • 3,657
21 votes
1 answer
555 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!
M.R.'s user avatar
  • 30.9k
21 votes
1 answer
285 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, ...
Sjoerd C. de Vries's user avatar
21 votes
1 answer
385 views

DynamicLocation usage

Background DynamicLocation can be very useful: ...
Kuba's user avatar
  • 135k
21 votes
1 answer
806 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 ...
Vitaliy Kaurov's user avatar
20 votes
2 answers
2k 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 ...
Daniel S's user avatar
  • 233
20 votes
0 answers
250 views

Inconsistent handling of Dynamic option values; intended, omission, or bug?

In answering Dynamic ClipPlanes calculated from current ViewPoint Kuba and I got into a brief exchange regarding how Option values wrapped in Dynamic should be ...
Mr.Wizard's user avatar
  • 267k
19 votes
4 answers
618 views

Internal DynamicModule steals scope of external DynamicModule

I have two dynamic objects, one nested in the other. Both have their own functions defined, as follows. I have simplified them to the point where they don't make much sense, but can still illustrate ...
István Zachar's user avatar
19 votes
4 answers
1k views

Autocomplete InputField

Is there a way to define a InputField that displays a list of options as you type? More specifically I'm looking for an ...
William's user avatar
  • 7,535

1
2 3 4 5
29