Decimal places in slider
Suppose you have a slider with given stepsize, say 0.1 like this
@interact
def _(a=slider(1,100,0.1)):
print a
Is it possible to adjust this, such that the number printed to the right of the slider has only one decimal place?
Would that just print the number with one decimal place, even though the actual number is not that? Or do you want the actual number to be what is displayed?
If I set the steps to 0.03 I want 2 decimal places and so on. However it would be sufficient to adjust this independently of the step-size. Just say "I want n-decimal places"...
The same question asked at http://ask.sagemath.org/question/800/interact-variable-print-formatting