0
$\begingroup$

Consider the following simple code:

Manipulate[Graphics[Point[{pt[[2]], -pt[[1]]}]], {pt, {0, 1}, {0, 1}}]

The purpose of this code is to show (y,-x) if the slider is in (x,y). However, it turns out that the 2D slider does not move. Why does this happen?

$\endgroup$
3
  • 3
    $\begingroup$ Need to specify {xmin,ymin},{xmax,ymax}. Try Manipulate[ Graphics[Point[{pt[[2]], -pt[[1]]}], PlotRange -> 2, Axes -> True], {pt, {0, 0}, {1, 1}}] $\endgroup$ – Dominic Apr 10 at 14:12
  • $\begingroup$ @Dominic Thanks! I think this should be accepted as an answer. $\endgroup$ – eigenvalue Apr 10 at 14:30
  • $\begingroup$ Ok, I post it as an answer. I probable should have done that rather than just a comment. $\endgroup$ – Dominic Apr 10 at 15:03
3
$\begingroup$

Need to specify {xmin,ymin},{xmax,ymax}. Try:

 Manipulate[ Graphics[Point[{pt[[2]], -pt[[1]]}], PlotRange -> 2, Axes -> True], {pt, {0, 0}, {1, 1}}] 
$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.