0
$\begingroup$

Regarding the use of 2D sliders in Manipulate: (1) How do you display the current value (x,y) that corresponds to the location of the slider point? (2) How can one enter a precise value for (x,y) to control the location of slider?

$\endgroup$
  • 3
    $\begingroup$ Use the option Appearance -> "Labeled", e,g, Slider2D[{0.5, 0.5}, Appearance -> "Labeled"]? $\endgroup$ – kglr Apr 13 '18 at 15:33
3
$\begingroup$

The nontrivial part of your question is (2) if interpreted as :

"How to use a 2D Slider and some 1D Sliders to manipulate the same object {x,y} ?"

Here is one way to do it :

Manipulate[WhatEverFunction[pt],
{{pt,{.5,.7}},{0,0},{1,1},TrackingFunction :> ((pt=#;x=#[[1]];y=#[[2]])&)},
{x,0,1,Manipulator,TrackingFunction :> ((x=#;pt[[1]]=#)&)},
{y,0,1,Manipulator,TrackingFunction :> ((y=#;pt[[2]]=#)&)}]

enter image description here

You can use either the 2D Silder or the 1D sliders to change pt={x,y}.

Note that you can open the 1D sliders (push the small button + on the right side) to access to a input field.

$\endgroup$

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