Let lower and upper be fixed constants, with lower < upper.

Now, suppose that x, y, and z represent any numbers that satisfy these constraints:

$lower \leq x < y < z \leq upper$

I'm looking for a way to represent such numbers x, y, and z in a Manipulate widget.

The ideal solution would be a single slider over the range [lower, upper], and having three knobs, one for each of x, y, and z, such that each knob is free to slide over the sub-interval defined by the neighboring sliders and the bounds lower and upper.

The IntervalSlider control gets me almost there, but it has only two knobs.

Does anyone know how to do this?


2 Answers 2


How about using a different object to control some variables? It's not exactly a Manipulate control but it can have the same effect:

HorizontalGauge[Dynamic@{x, y, z}, {0, 100}]


I haven't worked out the constraining of variables but this could be a useful start.

  • 3
    $\begingroup$ How about: Column[ { HorizontalGauge[Dynamic[{x, y, z}, Function[{val}, {x, y, z} = Sort[val] ] ], {0, 100} ], Dynamic[{x, y, z}]} ] $\endgroup$ Dec 16, 2016 at 16:56

A teeny modification to Smit's solution, to fit the requirements of the question:

With[{lower = 0, higher = 1},
  {HorizontalGauge[Dynamic[{x, y, z}, 
     Function[{val}, {x, y, z} = Sort[val]]], {lower, higher},
     ImageSize -> 400], 
   Dynamic[{x, y, z}]}]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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