# Questions tagged [locator]

Questions on position tracking, especially using Mathematica coordinate tracking functions and control objects such as Locator, LocatorPane, and ClickPane.

108 questions
Filter by
Sorted by
Tagged with
1 vote
35 views

### Interactive input of integer-coordinate 2D points

I'd like code to allow interactive input of a chain of 2D points, which are saved in some global variable. And in addition, I would like to constrain the coordinates to be integers. The code below is ...
• 4,731
90 views

### Locator control position changes

When only the g1 graph was drawn, the locator was in the desired position. However, when I expressed the two graphs vertically using the Coulmn function, the position of the locator changed. How can I ...
• 648
53 views

### TrackingFunction does not work when more than one Locator in Manipulator

TrackingFunction example Manipulate[ Graphics[Circle[], PlotRange -> 2], {{pt, {0, 0}}, Locator, TrackingFunction -> (pt = #/Max[Norm[#], 1]; &)}] ...
• 197
41 views

### Freeze slider if locator moved

I have list of many locators in my Manipulate: {{listoflocs, listoflocsinit }, Locator, LocatorAutoCreate -> True } And I have a slider there: ...
• 21
64 views

### Reset Button for Manipulate and freezing Sliders

I work on a Bezier curve subdivision project. I managed to implement it, but I faced some problems. (The code of my program is presented below.) Firstly, if I change parameter n after changing other ...
• 21
254 views

### Calligraphic Pen Signature Pane

This exchange about writing the infinity symbol using a calligraphic pen nib (https://mathematica.stackexchange.com/a/13376/43662) gave me an idea that is a bit steep for me to implement. The idea is ...
• 1,981
115 views

### Two locators in separate plots using Manipulate

I want to create two figures, side by side, each with an independent Locator. I want to do this using Manipulate, because I can easily use information from each Locator in both plots. This answer did ...
195 views

### Selecting Plot for Locator

Assume I have a manipulate with two graphics/plots as outputs. One of my parameters is a locator. How can I select in which of the plots the locator appears? Let's say I have the output given by this: ...
251 views

### Manipulate[] with interdependent Locators

how would I create a Manipulate to draw a InfiniteLine between two Locator? The first Loactor should control the x/y of the first point together with the y of the second one. The second Locator should ...
• 861
101 views

### How to use multiple Locators with different TrackingFunction in Manipulate?

I am trying to use TrackingFunction with Locator inside Manipulate, and it works fine with a ...
• 217
65 views

### How to restrict a locator to a line that changes based on manipulated variables?

I am trying to have a locator move along a manipulated line but every time I manipulate the variables the locator doesn't move across the new line. How can I get the locator to move across the line ...
141 views

### a "Calculate" button for Manipulate with Locator points

Looking for a methodology where the user can move the points of a Locator and then click a button to ask for calculations to proceed. The motivation for this is that the calculations of the full ...
• 1,069
141 views

### Removing locators breaks labels

I have some locators in a LocatorPane and want to let users remove them. Unfortunately, it seems doing this conflicts with the ...
• 31.5k
67 views

### Remove Locator doesn't work

I have the issue that I can't remove Locators, when using LocatorAutoCreate->True. For example the code snippet taken from "LocatorPlane" -> Options-> LocatorAutoCreate ...
• 81
71 views

### How to make a LocatorPane Appearance option dynamic?

I have a DynamicModule that contains a LocatorPane. The number of locators can be changed. The locators are labelled with a number. When the number of locators are changed the label numbers should ...
• 16.5k
62 views

### Can I make the locators in a locator pane move over the whole pane?

I'm trying use LocatorPane to produce locators that can move anywhere in the entire row of text I am displaying and not just in one of the rectangles, which is what ...
• 547
166 views

### How can I prevent TabView from resetting the current tab?

This is a simplification of a problem that has arisen in a project regarding Euclidean activities for verifying proportions via operations on pairs of magnitudes. In the project, the LocatorPane is ...
• 16.7k
153 views

### How to control two different variables with Locator?

It's my first time here but I didn't find answer to my problem and I can't menage that by myself,Mathematica documentation or even by previous stackexchange problems. In Manipulate I have two ...
• 534
35 views

### AutoAction not working with Locator and LocatorPane

This code is from the "Neat Examples" part on the LocatorPane page of the documentation: ...
230 views

### How to make a Locator3D/LocatorSphere?

On Making a LocatorSphere: Okay so I'm trying to realize a Locator3D-esque functionality for Mathematica. Something like a <...
• 3,352
1 vote
271 views

### Fix " not a Graphics primitive or directive" error in Dynamic Locator Pane

I am aware this might seem like a duplicate, however, I have viewed these posts (1 & 2) and have been unable to solve this. ...
• 547
1 vote
196 views

### Two locators on two different plots in Manipulate

I am trying to create a Manipulate module that shows two plots, and have locators on each of those plots, as well as two sliders. The locators do do not affect each ...
129 views

### How to implement LocatorAutoCreate functionality using EventHandler[]?

The documentation for LocatorPane says that LocatorPane is a special case of EventHandler, and gives the following code: ...
• 117
1 vote
62 views

### Locator position as argument in ImageTrim

I want to create a snippet that shows an image with two locators, and side-by-side with its crop based upon the position of the locators. Here is what I wrote. But it gives error that the list of ...
• 794
65 views

### How to change color of LocatorPane Dynamic point constrained to LogLogPlot line - when point is above set value?

In the following LogLogPlot, I'd like to have the Dynamic[pt] color change from Purple to <...
• 167
57 views

### How to constrain LocatorPane Dynamic point to a LogLogPlot line?

LocatorPane constrains to Plot[curve]: ...
• 167
239 views

### Mean RGB value of a locator region?

i am working at a color deconvolution using Ruifrok and Johnston's method (as described here). To get a custom stain, I need to realize a vector with mean RGB values of a region in a given image. So ...
107 views

### Creating multiple locators in Manipulator with constrained motion

I found a code to create multiple controls for a manipulate with a manipulate input and is working perfectly. ...
283 views

### How to make simple closed curve that can be smoothly morphed using locators

Given a simple closed curve in 2D with some locators on it, I would like to have be able to stretch and squish parts of the curve by moving the locators to morph the curve into another simple closed ...
• 5,565
754 views

### How to add a point and drag it into position in a 3D plot?

I have some plotted points and I would like to add new points and be able to drag a pre-existing or added point using my mouse. After I am satisfied with the new plot, I would like to extract the ...
• 10.8k
209 views

### How to rotate a graph with a locator?

Manipulate[ Graphics[Rotate[Line[{{0, 0}, p}], \[Theta], {0, 0}], PlotRange -> 2], {{p, {1, 1}}, Locator}, {\[Theta], 0, 2 \[Pi]}] I want to rotate a graph ...
• 95
50 views

### Is it possible to prevent LocatorPane from modifying locator positions unless Alt ket is down?

I am using the LocatorAutoCreate option which allows the user to hold Alt while clicking in order to create/remove locators. However, I need to be able to prevent ...
351 views

### How do I determine which Locator is selected in a LocatorPane with multiple Locators?

This is a cross-post of http://community.wolfram.com/groups/-/m/t/1186782 I am working on something where I need to know which locator out of many is currently being changed. Here is some working ...
• 4,510
79 views

### Is it possible to use the second argument of Dynamic when the first argument is a list?

I want to make a LocatorPane which allows the user to move the locators, with the restriction that the locators can only be moved to integer coordinates. However, I ...
169 views

### How can I scale a locator's coordinate within an image?

How can I use the Scaled feature and modify the Appearance of the Locator within ...
• 1,883
1 vote
121 views

### Initial Value of Locator in Manipulate

Consider the following example: Manipulate[u, {u, Locator}] which evaluates to: Now, if you start moving the locator around, you will see the coordinates update:...
• 1,048
130 views

### Problems With Locator Position Resetting

I am currently attempting to write code that allows users to add shapes to a window and arrange them to create an image. To do this, I make each shape into a locator. This method seems to work well. ...
• 23
143 views

### How to fix a locator to a desired plot of a Grid of plots?

In my interactive demonstration there is a grid of plots, where 2 are 1D plots and the other 2 are contour ones. I need a locator placed in one of the contour plots to manipulate the parameters of the ...
• 39.5k
1 vote
151 views

### Constraining locators [duplicate]

Is there any canonical way to constrain locators either continuously (e.g. to lie on the graph of a function) or discretely (snap to grid leaps to mind)? The documentation seems a little sketchy on ...
• 5,094
1 vote
186 views

### Making a cursor for graphics using a Locator in LocatorPane

I am trying to add some cursors to a plot. I am using LocatorPane and form the cursors by setting the Appearance option. However, I can't seem to find out how big the cursors will be and I need them ...
• 16.5k
275 views

### Assign Locator points to a specific plot

Result on the left is not what I intended to do: it has two sets of Locator points. Trying to determine why two sets of Locator points are appearing. I only intended to have one set. Result on ...
• 1,069
146 views

### Why does Locator changes graphics depending on ImageSize?

This is driving me nuts. Consider this Manipulate command ...
• 5,483
1 vote
213 views

### Implementing a Locator for Graphics3D drawing tools for programmatic drawing

As a hobby I write from time to time some tools for programmatic technical drawing. Below I give an example of a function modifyGraphics[] which enables one to fast ...
• 39.5k
200 views

### Performance issue of Manipulate with NSolve and Locator

I want to solve a nonlinear equation eq in a Manipulate environment as the following one using a ...
• 5,483
105 views

...
• 157
280 views

### Overlaying an image with a movable disk that can be resized

I'm trying to create this: A map with a PNG picture in the background A locator for position The locator (p1) needs to have a disk with center in p1 The problem is that the locator disk and the map ...
• 157
86 views

### How constrain a Locator to follow a list of points inside Manipulate?

I would like position two locators on discrete positions which are list's elements and represent a list of point's coordinates. I've ani image and on this I've detected ten circle shape. Now I'd like ...
• 21
195 views

### Constraining locators in a locator pane to a specified data set

What is the best method to constrain multiple locator points to a set of data? A while back, I needed a program that could perform a linear fit for a specified range of data points. In an effort to ...
• 61
625 views

### Insert new points at specific places in the Locator Pane?

I am trying to make some BSplineCurve examples for my students. For fun I created the following Manipulate that draw an elephant using ...
• 1,047