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

learn more… | top users | synonyms

15
votes
2answers
361 views

Rounding problems inside InputField

Consider the following InputField InputField[Dynamic[h2, If[# === Null, h2 = h2, h2 = Round[#, 0.001]] &], Number] The ...
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 ...
14
votes
3answers
841 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
4answers
719 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 ...
14
votes
3answers
256 views

On making a graphical real-time memory usage monitor

I'd like to make a graphical version of Dynamic[Refresh[MemoryInUse[], UpdateInterval -> 1]] A naive implementation would be something like: ...
14
votes
2answers
808 views

Manipulate slider unresponsive after suspend in Linux

I've tested Linux Mathematica versions 7-9 on various Linux distributions, with identical problem: after suspend/resume cycle my Manipulate controls (i.e. sliders&buttons) appear unresponsive, ...
14
votes
1answer
170 views

How to make a dynamic nested menu?

There is no dynamic controller that can represent a hierarchical menu structure: ActionMenu can only handle flat action lists. Thanks to Kuba, we know a lot about ...
14
votes
2answers
320 views

Tips to move from functional programming to GUI-based applications

Even though this forum has some questions related to Mathematica programming tips I think that we still don't have specific help for those who want to learn to efficiently create GUIs in Mathematica. ...
14
votes
0answers
342 views

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

Recently I want to write a game,Minesweeper.Here is my completed code. ...
13
votes
4answers
471 views

How to make a movie from a complex demonstration?

I have a complex Manipulate-based demonstration containing a few sliders and a Setterbar. I would like to make a movie out of it, avi, or whatever else. The ...
13
votes
3answers
261 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 ...
13
votes
2answers
278 views

ShearingTransform and Dynamic

Background: I have a geometric transformation composed of a RotationTransform, ScalingTransform and ...
13
votes
2answers
186 views

How to prevent Dynamic activity with colour swatches in V10+

Since version 10, if I type e.g. an RGBColor or simply a named color, a dynamic colour swatch is returned. Same goes for when you e.g. extract colours from a ...
13
votes
1answer
254 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
458 views

How to create interrelated sliders?

Say I want a slider that controls the value of $x$ and another slider that controls the value of $2x$, how would I go about it?
13
votes
1answer
145 views

How to retrieve current FaceForm?

The current colour in a Graphics object can be retrieved using CurrentValue["Color"] for use in Dynamic stuff. Example: ...
13
votes
1answer
428 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
88 views

How to service preemptive computations while running a LibraryLink function?

Cross-posted to Wolfram Community The following is from the comparison between WSTP (MathLink) and LibraryLink in the documentation: When the Wolfram Language is waiting for a WSTP application ...
13
votes
1answer
448 views

Unique[] symbol not properly tracked

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

Current (e.g., ca. 2016 / MMa 10 / WP 4+) best practices for embedding interactive content in WordPress?

My strategy, in the past, has been to embed interactive CDF files into my WordPress blog for student's to use (Much like the Wolfram Demonstration Project). As many know 1) the 'Plug in' ...
12
votes
5answers
2k views

How can I simulate this animation of checking for prime numbers?

I can only implement a very simple one, I want to make my code look like that. Any better ideas? ...
12
votes
3answers
566 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 ...
12
votes
2answers
631 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, ...
12
votes
2answers
638 views

Syntax highlighter shows error for Manipulate when it's inside a Block or a Module

I'm putting my new copy of Mathematica 10 through its paces and I noticed a weird change in the colouring scheme that I find very annoying, and I'd like to get some insight into why it's happening. ...
12
votes
4answers
471 views

Graphics can't be live and editable

Is there a way to construct an interface so that the Code and the Graphics remain in sync? For example I would like to be able to drag/drop and move around different shapes in Graphic while seeing ...
12
votes
3answers
330 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 ...
12
votes
3answers
625 views

How to anchor a Pane's scroll position to the bottom?

Suppose I have a Pane containing some dynamic text, for example that is being updated by a logging function. ...
12
votes
1answer
297 views

How to create a notebook element that can replace itself?

I would like to create a notebook element that can replace itself. Here's an example to illustrate: ...
12
votes
1answer
202 views

How to see a code preview (in Experimental`Explore[] or related GUI)

I have been messing around with built in Experimental`Explore[] function. You can call the function in Mathematica yourself to see what it looks like. It is a GUI ...
12
votes
1answer
307 views

Why is my rasterized graphic blank?

Bug introduced in 7.0 or earlier, and persisting through 10.1 or later (OSX 10.10.2) Consider the following code: ...
11
votes
4answers
887 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 ...
11
votes
7answers
1k views

How to dynamically toggle curves on/off in a crowded Plot?

When multiple curves appear in a single plot, it is useful to interactively turn certain curves on or off to visually compare smaller numbers of curves. It is trivial to put a quick dynamic together, ...
11
votes
2answers
337 views

Make a button that evaluates a function over and over

I would like to have a command "RedoButton" which would make a button (or whatever control is suitable) that when clicked would print the value of a certain function over and over in the same place. ...
11
votes
3answers
595 views

Plot on command within DynamicModule?

Suppose I have a DynamicModule with all sorts of controls to set some parameters for a graphics object. ...
11
votes
1answer
1k views

What does the message 'This file contains potentially unsafe …' mean and how serious is it?

I had some Mathematica files on over which recently I have faced to this message: However, after searching, I have seen some blogs in Mathematica SE or in somewhere else about that, but I could not ...
11
votes
3answers
485 views

Drawing an arrow pointing at the “Enable Dynamics” button

Sometimes my students are given Mathematica notebooks as part of an assignment, and asked to go through some demonstrations contained in the .nb file. A lot of times I get complaints that the "graphs ...
11
votes
3answers
315 views

Intermediate display similar to PrintTemporary

Using MMA we often come across situations like the following cityLIST = CityData[#, "Name"] & /@ CityData[]; This code if you evaluate will emit some display ...
11
votes
1answer
641 views

InputField does not update correctly

By fiddling with Vitaliy's solution for a small GUI, I've come accross this particular behaviour of InputField: ...
11
votes
1answer
3k views

How to work around Mathematica hanging when showing a large SparseArray?

Bug introduced in 9.0 and fixed in 9.0.1 In Mathematica 9, if I display any large SparseArray object in the default way (which looks something like ...
11
votes
2answers
430 views

Dependent Manipulate sliders

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

TimeConstrained dynamic change of maximum time

I would like to run a time consuming function: TimeConstrained[f[x],maxseconds] and be able to change maxseconds during running (increasing or decreasing max ...
11
votes
1answer
98 views

Speed up Dynamic for graphical interface

I am trying to create a user interface where I can click on certain points in a set of data and save them into a list that can be used later in my code. The problem is it is currently sluggish. Is ...
11
votes
1answer
228 views

How can I include functions from a package into a CDF file?

I am building an application which I would like to deploy as a CDF file, and I am struggling to make the CDF exports work correctly with functions pulled from a .m package file. What are good/best ...
11
votes
1answer
287 views

Possible bug with second argument of Dynamic

Bug fixed in V 10. According to the documentation, Dynamic Details & Options section, especially: For interactive mouse operations ...
11
votes
2answers
606 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. ...
11
votes
1answer
158 views

How can I make a stylesheet that counts subcells?

The example cells in the documentation each have count of the cells inside their section: ...
11
votes
2answers
390 views

Memory leak in FE?

A very abridged example of what was originally a major leak ...
11
votes
1answer
269 views

Time range selector à la InteractiveTradingChart

I have time series data and I would like to interactively select a part of it. This problem is beautifully solved in the lower part of the InteractiveTradingChart command: I would like to be able ...
10
votes
4answers
362 views

Panning with Mouse

This is related to the question i just asked here but not the same. How could i create a manipulate that lets me move the graph to any position i want by clicking and dragging anywhere. Here is an ...
10
votes
3answers
303 views

Problem with UpdateInterval

I want to monitor current results with Dynamic ...