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

learn more… | top users | synonyms

2
votes
1answer
68 views

PaneSelector and options in a Module

Consider the following snippet of code: ...
5
votes
2answers
210 views

How to create a ListLinePlot with a layout analogous to ChartLayout -> “Stacked”?

I am using 3 checkboxes as desktops, portables and ipods in such a way that when I click to desktops it should shows ListLinePlot of ...
9
votes
1answer
172 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: ...
10
votes
2answers
220 views

Memory leak in FE?

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

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

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

Manipulators and Dynamic in more concise code

Is there a way to update dynamic variables through a function. I was looking back at one of the answers from Heike where she showed me how to make my custom ...
6
votes
2answers
300 views

Formatted text in a Dynamic or Manipulate control

I am using a Manipulate control to show different calculations for the same user-specified parameters. I would like to show the results for the calculation the ...
4
votes
1answer
100 views

How to speed up mouse events?

Grids of dynamic objects responding to mouseovers seem to be quite slow in general, for instance: ...
6
votes
1answer
138 views

LocatorPane and multiple EventHandlers, PassEventsDown option

Consider the following piece of code from Heike as an ( accepted ) answer on LocatorPane, selecting multiple Locators - Basically the code implements dragging polygons on a LocatorPane. ...
18
votes
3answers
405 views

LocatorPane and PlotRange

Consider the following snippet from the documentation on LocatorPane ...
23
votes
3answers
1k 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 ( ...
2
votes
1answer
125 views

LocatorPane, Dynamic and deleting locators

Compare the following two code snippets : Version 1 ...
2
votes
2answers
140 views

Question about MapThread and Dynamic

I don't understand the following: f[a_, b_] := a + b ls = {1, 2, 3}; MapThread[f, {ls, {10, 20, 30}}] This yields ( as expected ) {11,22,33} If I change ...
13
votes
3answers
508 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? ...
11
votes
1answer
235 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: ...
8
votes
2answers
226 views

Strange behavior of CreateDialog's WindowSize option

Compare the two dialog windows, created by the same code except in the first WindowSize has a value while I omit it in the second one. Note, that ...
0
votes
0answers
55 views

InputString in Button freezes Mathematica [duplicate]

Possible Duplicate: Why does Button[ … , ChoiceDialog[] ] freeze the front end? Warning: the following code may freeze your session, as it does mine. I have to wait for the dialog ...
14
votes
1answer
310 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 ...
5
votes
3answers
180 views

Question about modifying a Slider2D control

Background: I want to develop a custom control, based on a 2D slider. I currently have this ( working ) example. ...
7
votes
2answers
143 views

Is it possible to make a variable wrapped in Dynamic non-dynamic?

If I have a function call wrapped in Dynamic can I make one or more of the parameters in the call non-dynamic? i.e. I would like to make ...
22
votes
4answers
601 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 ...
10
votes
4answers
469 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 ...
10
votes
2answers
176 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. ...
18
votes
2answers
277 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 ...
4
votes
1answer
160 views

How to control variables of outer and inner Manipulates?

Consider the following ( working ) snippet: ...
10
votes
1answer
169 views

Rounding problems inside InputField

Consider the following InputField InputField[Dynamic[h2, If[# === Null, h2 = h2, h2 = Round[#, 0.001]] &], Number] The ...
3
votes
1answer
95 views

Safely generating multiple controls from a list of variables

Suppose I need to create sliders associated with variables from a given list: ...
11
votes
3answers
287 views

Mathematica as a report generator

I would like to use Mathematica as a kind of report generator. I'm working in a Mathematica notebook and I want to handle Mathematica like this: 1) I want to define one cell as a text cell. In this ...
16
votes
1answer
360 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 (...
7
votes
1answer
219 views

Locking a value when Manipulating variables

I'm trying to achieve something similar to Bret Victor's brilliant Scrubbing Calculator in Mathematica. By using Manipulate I'd like to change the values of the variables such that if I modify one ...
6
votes
1answer
407 views

How to make a dynamic stopwatch?

For some experiments I need some basic timer function. I tried various methods, and neither of them are fully satisfactory. What I need is a button, that starts/stops a timer, resets timer with each ...
5
votes
1answer
151 views

How to add several Locators to a Graphic with a mouse click?

Background: Suppose I have something like this: ...
5
votes
2answers
337 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 ...
5
votes
1answer
198 views

Make EventHandler work for clicks and keys in a Dynamic display

I am trying to write a way that will do certain events depending on what screen is showing. What happens so far is that the screen will change in accordance to a click, but when you try to do the ...
5
votes
3answers
280 views

Printing a Dynamic variable inside Dynamic

I'm trying to Print the variable a inside the Dynamic wrapper. Seems like such a simple question, but I haven't been able to get ...
2
votes
0answers
183 views

Front-end glitch when interacting with dynamic content

This is now bugging me too much to ignore it anymore. When I interact with a notebook that has dynamic content, for example moving a slider, Mathematica regularly brings other open notebook windows to ...
6
votes
1answer
256 views

Way to find color at a point in a Graphics?

I need to figure out a way to find out the RGB color value at a certain coordinate in a Graphics object. The Graphics object I am dealing with is continually Dynamically updated, so it is made of ...
13
votes
2answers
370 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 ...
17
votes
3answers
339 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. ...
4
votes
1answer
197 views

What changes in Dynamic have occurred from Mathematica 7 to Mathematica 8 that might induce incompatibilities?

I have a function that outputs a Manipulate (say FAnimated[params_]:= Manipulate[F[params,t], {Time, Animator[t]}] where F ...
3
votes
1answer
173 views

Forcing a graph not to resize

This code: ...
9
votes
2answers
168 views

Update only one element in a dynamic grid?

I've got a grid of buttons that each display an image from an array. When a button is clicked, its image changes. ...
4
votes
3answers
171 views

How can I compare a dynamic variable with a literal in Mathematica?

I'm doing a Mathematica Notebook and I want to make an alarm clock. Something like this: ...
6
votes
2answers
237 views

Detecting double click events

Is there a way to detect double click events? I did not find anything on the doc page of EventHandler. Use case: I want to re-implement the ...
11
votes
3answers
211 views

Plot on command within DynamicModule?

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

Undocumented Dynamic Function question

In the code below the value displayed next to the slider may be correct, and should be the result of The value of x for cyL and ...
16
votes
3answers
722 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 ...
16
votes
3answers
297 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 ...
4
votes
2answers
243 views

Switching off Dynamic updating on a cell by cell basis

Is there a simple way to switch off Dynamic evaluation for a particular cell? I usually delete the cell if it disturbs other evaluations or affects the performance ...
3
votes
1answer
155 views

Avoid crash in recursive Dynamic

With the following Dynamic cell, I can reproducibly crash Mathematica, so do not try this unless you have saved all your work! ...