represents a pane with a locator at position {x,y} and background back.


takes the locator position to be the dynamically updated current value of pt, with the value of pt being reset if the locator is moved.


sets up multiple locators at positions pt1, pt2, .


takes the locator positions to be dynamically updated current values of the pti.


specifies the range of coordinates for the locator.


uses jumps dx, dy.

Details and Options

  • The background in a locator pane can be a graphic or any other expression.
  • For a Graphics object g, LocatorPane[pt,g] by default takes the range of coordinates for pt to be the range of graphics coordinates corresponding to PlotRange in g.
  • For a general expression, LocatorPane[pt,expr] takes the range of coordinates for pt to be 0 to 1 in each direction.
  • The following options can be given:
  • AppearanceAutomaticthe appearance of locators
    AutoActionFalsewhether to move the locator automatically when the mouse is over it
    BaselinePositionAutomatichow to align with a surrounding text baseline
    BaseStyle{}base style specifications for the locator pane
    ContinuousActionTruewhether to update continuously when locators are moved
    EnabledAutomaticwhether the locator pane is enabled, or its locators are grayed out
    Exclusions{}specific points to exclude
    LocatorAutoCreateFalsewhether to allow clicks to create new locators
  • whether to zoom to fullscreen when activated on a touchscreen
  • With the setting Appearance->g, all locators in the locator pane are displayed as g, where g is any graphic or other expression. »
  • With Appearance->{g1,g2,}, the i^(th) locator is displayed as gi. »
  • LocatorPane[{pt1,pt2,},back,{range1,range2,}] specifies different ranges for different locators.
  • LocatorPane[pts,back,range] by default directs any click to the nearest locator.
  • The settings for BaseStyle are appended to the default style typically given by the "LocatorPane" style in the current stylesheet.


open all close all

Basic Examples  (2)

Create a locator pane with a single locator and a background image of a disk:

Click for copyable input

Create multiple locators:

Click for copyable input

Use Dynamic to connect locator positions to variables:

Click for copyable input

Do the same for multiple locators:

Click for copyable input

Scope  (8)

Options  (15)

Applications  (6)

Properties & Relations  (2)

Neat Examples  (3)

Introduced in 2007
Updated in 2012