I want to choose a point of a triangle by choosing its weights. This should be done by controlling 2 Sliders (matplotlib.widgets.Slider
). These two sliders express two out of three weights that define the point. The third weight is easily calculated as 1.0 - slider1 - slider2
.
Now it is clear that the sum of all weights should be equal to 1.0, so choosing 0.8 and 0.9 as the values for the two sliders should be impossible. The argument slidermax
allows to make sliders dependent, but I can not say:
slider2 = Slider(... , slidermax = 1.0-slider1)
slidermax
requires a type Slider
, not integer
.
How can I create dependencies a little more complex than this slidermax option?