Questions tagged [locator]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
38 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. ...
0
votes
0answers
24 views

Locator control on iPad

How can I make Locator control to work in Web published notebook on Ipad? it works fine in web browser on laptop using mouse.. please use this linkmto see my code. https://www.wolframcloud.com/obj/...
1
vote
1answer
60 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 ...
5
votes
1answer
55 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: ...
1
vote
1answer
28 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 ...
2
votes
1answer
41 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 <...
2
votes
1answer
33 views

How to constrain LocatorPane Dynamic point to a LogLogPlot line?

LocatorPane constrains to Plot[curve]: ...
7
votes
1answer
146 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 ...
2
votes
1answer
69 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. ...
9
votes
1answer
238 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 ...
7
votes
2answers
379 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 ...
2
votes
1answer
102 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 ...
3
votes
0answers
41 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 ...
10
votes
3answers
212 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 ...
3
votes
1answer
64 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 ...
2
votes
1answer
98 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
vote
1answer
79 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:...
2
votes
2answers
110 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. ...
2
votes
0answers
108 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 ...
1
vote
0answers
90 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 ...
1
vote
1answer
134 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 ...
2
votes
2answers
133 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 ...
2
votes
2answers
104 views

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

This is driving me nuts. Consider this Manipulate command ...
1
vote
0answers
117 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 ...
4
votes
1answer
124 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 ...
3
votes
1answer
89 views
3
votes
1answer
217 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 ...
2
votes
0answers
71 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 ...
6
votes
1answer
154 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 ...
4
votes
2answers
447 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 ...
2
votes
2answers
119 views

Dynamic locator: update to new position inside `Manipluate`

I'd like the locator to update to its new position when k is altered: ...
3
votes
2answers
114 views

Preventing LocatorPane Locator from moving when PlotRange changes

I have a LocatorPane within a Manipulate such that the range of the plot behind the Locator ...
3
votes
1answer
69 views

Context-aware Locator

I'm trying to use a Locator for some image processing tasks. Unfortunately, the images we're using have a high dynamic range of low-frequency black and white ...
3
votes
1answer
294 views

How to use locator continuously with grid of graphics

I am trying to find out, how to properly use a locator continuously within manipulate and a grid of graphics. I have the following example out of this code ...
2
votes
1answer
175 views

Creating a function takes a list and dynamically modifies that list [duplicate]

I'm trying to create a function that uses a dynamic locatorpane to populate a list with the coordinates of user defined locators (added by alt+clicking). This code works fine: ...
5
votes
2answers
119 views

A locator that is visible only when it is used

I want to construct a graphics with a locator on top of it. This locator normally has to be invisible, but when I click somewhere in the graphics, the least that has to happen is that the locator ...
3
votes
1answer
167 views

Interacting with the vertices of a polygon and points on a circle

I want to create an interactive module, where I can plot the vertices of polygon and some points on a circle(for example, suppose a triangle and 3 points on the circle) and move the vertices of the ...
1
vote
0answers
56 views

Using DynamicModule and Locator with an external Module [closed]

I wish to call an external Module, called PCA inside a DynamicModule. Essentially, this ...
1
vote
0answers
139 views

In a tool for a programmatic drawing let us capture a locator position into a clipboard [closed]

This code allows one to fast draw a technical sketch. I simplified it to extreme. It contains a disk (instead of your real sketch) and a line pointing to a place in the sketch, which you want to ...
2
votes
1answer
166 views

How to draw Locator on circle[{m,n},r]? [closed]

I want to draw Locator on circle[{m,n},r]. The follwing point p is free Locator. How to draw Locator on Circle[{m,n},r] ? ...
2
votes
2answers
128 views

How-to let user define a set of VertexCoordinates in a Graph

Here is a simple code I wrote to visualize what I am trying to achieve: C.1 ...
3
votes
2answers
921 views

Manipulate a 2D point controlled simultaneously by Locator and its coordinates

I'm trying to have a point in the plane which can be manipulated both using Locator as well as inserting its $x$ and $y$ coordinates. My attempts at doing this are: ...
6
votes
1answer
424 views

How to restrict the motion of a Manipulate-generated Locator along a line?

If one uses a stand-alone locator and needs it to only be movable along a curve, say, defined by a function f[x], one can use a simple construct: ...
5
votes
2answers
143 views

Locator-based abscissa ranges widget

I'm trying to implement a widget that will enable users to graphically determine certain abscissa ranges in a 2D plot. I've started by coding a prototype, whose output looks like this: The idea for ...
3
votes
2answers
689 views

Locator and manipulate

How can I achieve that the points on a Graphics element could be manipulated both by Locators (clicking and moving) and on the Manipulate panel as well. As you can see, only one of the methods work. ...
0
votes
1answer
120 views

Interacting Dynamic Components within LocatorPane

I am attempting to create a dynamic contour plot of an ellipse with two locators as the foci within a locator pane. The following code has been implemented: ...
2
votes
2answers
399 views

How to do dynamic range selection for data fitting in Log plot?

In linear plot, this can be achived by Locator like this: https://mathematica.stackexchange.com/a/24935/13580 ...
0
votes
2answers
161 views

How to fit points in a picture using locators

I've got a problem doing some analysis work on some of my spectra. I am basically looking for features that look like parabolas. In need of a tool to quickly find two parabolas in a spectrum (they are ...
2
votes
1answer
64 views

Disable locator-removal in LocatorPane

is there a way to DISABLE the ability to remove points with ALT-click (APPLE-click) from a locator pane? I'm writing a code that allows users to manually label objects in an image by connecting two ...
2
votes
2answers
178 views

Manipulate with Locator question

Here is an example from Mathematica's help: Manipulate[Graphics[Polygon[pt], PlotRange -> 2], {{pt, {{0, 0}, {1, 0}, {1, 1}, {0, 1}, {1, -1}}}, Locator}] ...