ASKSAGE: Sage Q&A Forum - Latest question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 14 Apr 2019 14:00:24 -0500flow control in sage notebooks?http://ask.sagemath.org/question/46163/flow-control-in-sage-notebooks/ I would love to insert a *break* or *stop* command into sage files, in order to absolutly stop further processing. The interpreter (?) should not die or exit, but rather pretent to be done with the notebook.
I looked through the sage reference and didnt find something similar. actually i didnt find anything on the whole flow control topic. stockh0lmSun, 14 Apr 2019 14:00:24 -0500http://ask.sagemath.org/question/46163/interact buttons that do stuff, not just selectorshttp://ask.sagemath.org/question/10810/interact-buttons-that-do-stuff-not-just-selectors/Is there some way to build a interact control button so that, when pressed, a designated action/program is carried out so as to produce a new result to be added to an existing display -- e.g., a button to generate a new random number and add it to an existing list, a button to add another data point to an existing scatter plot, or to eliminate an outlier, etc. An example that I could look at would be enough to get me started.
FWIW, this is what the "Button" gizmo in Mathematica does: "Button[_label_,_action_]
represents a button that is labeled with _label_, and evaluates _action_ whenever it is clicked."Tom BurkeFri, 06 Dec 2013 11:15:52 -0600http://ask.sagemath.org/question/10810/Notebook text and figure layout controlhttp://ask.sagemath.org/question/7952/notebook-text-and-figure-layout-control/I have created 2 text strings in a sage notebook and 2 figures with Matplotlib. I in the following top to bottom order:
show(B_txt);
Bw_fig.canvas.print_figure('bw_plot.png');
show(U_txt);
BwU_fig.canvas.print_figure('bwu_plot.png')
The displayed order top to bottom is B_txt, U_Txt; figure; figure. How can I get Sage to display these is in the correct order?
mhfreyThu, 17 Feb 2011 03:56:02 -0600http://ask.sagemath.org/question/7952/Interact depending on other argumentshttp://ask.sagemath.org/question/7821/interact-depending-on-other-arguments/Hello,
Is it possible to have interact arguments depend on one another? For example, having the maximum of one slider depend on the former? I tried this:
<pre>@interact
def metacontrol(a=slider(5,10)):
@interact
def control(b=slider(0, a)):
pass
</pre>
But it doesn't work; updating the first slider deletes the second slider. It is possible with two cells, but this requires executing the cell which defeats the purpose of interact.
Thank you.Eviatar BachFri, 17 Dec 2010 19:05:41 -0600http://ask.sagemath.org/question/7821/