Locator in ListPlot is constrained to x<1 , y<1

  • Mathematica
  • Thread starter Swamp Thing
  • Start date
  • #1
This is supposed to show a locator that we can drag anywhere in the plot:
Code:
Manipulate[
                        
                     ListPlot[      {{0.5, 0.5}, p1},
                                          Joined -> True,
                                          PlotRange -> {{0, 5}, {0, 7}}, ImageSize -> {250, 250}
                                  ],
                    {p1, {2.5, 3}, Locator}
              ]

Initially it appears at (2.5,3) but as soon as I start dragging the locator, it snaps to (1,1) and won't move out of the square x<1, y<1.

Strangely, this problem happens running Mathematica 12.1.1 on a Raspberry Pi. It works correctly on the cloud version at wolframcloud.com.

According to the doc, the locator's range should be equal to the PlotRange of the graphic. Since it's not taking this default, is there a way to specify the locator's range?
 
Last edited:

Answers and Replies

Suggested for: Locator in ListPlot is constrained to x<1 , y<1

Replies
4
Views
1K
  • Last Post
Replies
6
Views
358
Replies
8
Views
1K
  • Last Post
Replies
7
Views
534
  • Last Post
Replies
4
Views
1K
  • Last Post
Replies
6
Views
884
  • Last Post
Replies
1
Views
413
  • Poll
  • Last Post
Replies
11
Views
2K
  • Last Post
Replies
2
Views
934
Replies
5
Views
825
Top