ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 25 Aug 2019 23:38:56 +0200Slider for fractions of pihttps://ask.sagemath.org/question/47565/slider-for-fractions-of-pi/ I'd like to have in @interact a slider for (0,2*pi) with stepsize 0.05*pi that shows as label $\alpha$ and the current value only in the format $x*\pi$Wed, 21 Aug 2019 23:31:23 +0200https://ask.sagemath.org/question/47565/slider-for-fractions-of-pi/Comment by Iguananaut for <p>I'd like to have in @interact a slider for (0,2<em>pi) with stepsize 0.05</em>pi that shows as label $\alpha$ and the current value only in the format $x*\pi$</p>
https://ask.sagemath.org/question/47565/slider-for-fractions-of-pi/?comment=47570#post-id-47570So make a slider from 0 to 2 with step size 0.05 and then multiply that `x` by `pi`. Did you have some trouble doing that? What did you try?Thu, 22 Aug 2019 22:43:47 +0200https://ask.sagemath.org/question/47565/slider-for-fractions-of-pi/?comment=47570#post-id-47570Answer by Emmanuel Charpentier for <p>I'd like to have in @interact a slider for (0,2<em>pi) with stepsize 0.05</em>pi that shows as label $\alpha$ and the current value only in the format $x*\pi$</p>
https://ask.sagemath.org/question/47565/slider-for-fractions-of-pi/?answer=47575#post-id-47575Wouldn't a slider for $x_r\in\left[0~1\right]$ and a label reporting `"\alpha = 2\pi{}".format(x)`do the job ? Of course, in the computation, you'd have to use $\alpha=x_r\cdot2\pi$. So what ?Fri, 23 Aug 2019 10:27:13 +0200https://ask.sagemath.org/question/47565/slider-for-fractions-of-pi/?answer=47575#post-id-47575Comment by Ingo for <p>Wouldn't a slider for $x_r\in\left[0~1\right]$ and a label reporting <code>"\alpha = 2\pi{}".format(x)</code>do the job ? Of course, in the computation, you'd have to use $\alpha=x_r\cdot2\pi$. So what ?</p>
https://ask.sagemath.org/question/47565/slider-for-fractions-of-pi/?comment=47590#post-id-47590The current value from the sliderr is displayed to the right of the sliderr - that would show the value of x_r, but I should like to see there that value augmented by $\cdot2\cdot \pi$.Sun, 25 Aug 2019 23:38:56 +0200https://ask.sagemath.org/question/47565/slider-for-fractions-of-pi/?comment=47590#post-id-47590