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.Mon, 06 Apr 2020 18:10:42 +0200Table frame not showing in Jupyter Notebook and inconsistent in other environmentshttps://ask.sagemath.org/question/50600/table-frame-not-showing-in-jupyter-notebook-and-inconsistent-in-other-environments/ Hello, Sage community!
The `table` command in Sage has this useful option called `frame`. If I set `frame=True` in SageCell, CoCalc, the Sage terminal and SageTeX, the result is the expected: a frame is shown for the corresponding table. However, the same command does not work properly in Jupyter Notebooks. Also, the results are quite different in SageCell and CoCalc.
The following three images show the result of executing the following commands:
rows = [[100,2,3], [4,5,60]]
t = table(rows, frame=True)
show(t)
This is the result in SageCell:
![image description](/upfiles/15861892266090416.png)
This is the result in CoCalc:
![image description](/upfiles/1586189242468030.png)
This is the result in Jupyter (executed using `sage -n jupyter`):
![image description](/upfiles/15861892732930594.png)
Here are my questions:
1. Why is the `frame=True` option not working in Jupyter?
2. Why the difference in the results?
3. Is there any way to make these results consistent through these environments?dsejasMon, 06 Apr 2020 18:10:42 +0200https://ask.sagemath.org/question/50600/Interact layout in Jupyter-Notebookhttps://ask.sagemath.org/question/47120/interact-layout-in-jupyter-notebook/When I run this code
@interact(layout=dict(top=[['f', 'color']],
left=[['axes'],['fill']],
bottom=[['zoom']]))
def _(f=input_box(x^2,width=20),
color=color_selector(widget='colorpicker', label=""),
axes=True,
fill=True,
zoom=range_slider(-3,3, default=(-3,3))):
show(plot(f,(x,zoom[0], zoom[1]), color=color, axes=axes,fill=fill))
in Jupyter notebook, the controls are not organised as specified. But this is not so with the old SageNB notebook. How can I make the controls specified in the `layout` parameter to appear in the output as originally specified? Please advise.eocanseyWed, 10 Jul 2019 23:49:30 +0200https://ask.sagemath.org/question/47120/More Complex Interact Layouthttps://ask.sagemath.org/question/36697/more-complex-interact-layout/I know i can use layout to specify top, left, right, bottom. However, I've been able to figure out how to layout more than a few rows. For instance, I would like to place 5 rows each containing 1 textbox and 1 button side by side. Also, in between each row of button/textbox I would like to have additional text. Is this possible to do inside of one cell or will I have to get creative with it?mcweihingWed, 22 Feb 2017 22:07:40 +0100https://ask.sagemath.org/question/36697/Tree layout of a graphhttps://ask.sagemath.org/question/31513/tree-layout-of-a-graph/ Consider the graph of this tree:
T = Graph()
E = [(0, 1), (1, 2), (2, 3), (2, 4)]
T.add_edges(E);
T.show(layout='tree',tree_root=0,tree_orientation='down')
![image description](/upfiles/14499200675194864.png)
I would like to see the edges displayed in the order as given in the list E from left to right.
In other words, I would like to have node(4) exchange its position with node(3).
How can I achieve this?
*Edit:* To clarify: Changing the order of the edge-list is no option
(besides not working either). The order of the edges must be adhered
to the order given.Peter LuschnySat, 12 Dec 2015 12:42:23 +0100https://ask.sagemath.org/question/31513/Keyboard layout to Qwertz VMhttps://ask.sagemath.org/question/30484/keyboard-layout-to-qwertz-vm/ Hi guys,
I am using Sage 6.8 VirtualBox on a Windows.
I am new to sage and it's been a while I have been trying to change the keyboard layout of my VM into my Qwertz Keyboard layout.
I have seen the steps: nano .xinitrc / setxkbmap [countrycode]
I come from Switzerland so I have tried to put country code CH, DE but it seems to stay on a Qwerty keyboard layout....
Could someone help me please?
Thanks a lot!ZouZouThu, 05 Nov 2015 15:13:22 +0100https://ask.sagemath.org/question/30484/Using layout option with auto_update=falsehttps://ask.sagemath.org/question/9999/using-layout-option-with-auto_updatefalse/I'm writing an interactive and want the two pull-down menus and the update button to all appear in one row. `@interact(layout={'top': [["ansA", "ansB"]]})`works fine but doesn't show the update button. How do I include it in the layout?jaiaSat, 06 Apr 2013 19:28:15 +0200https://ask.sagemath.org/question/9999/Keyboard layout in Sage appliancehttps://ask.sagemath.org/question/8640/keyboard-layout-in-sage-appliance/Hi all,
I'm currently testing Sagemath on a Windows 7 box via sage appliance (4.7.2). I wanted to try the interactive shell out but it is not usable as my host keyboard layout is fr and the guest fedora box for sage uses en.
A quick search pointed me to the `system-config-keyboard` command but too bad, it is not shipped with sage appliance 4.7.2. Any other hint ?
**Final solution** (see below): change layout via `sudo nano /etc/sysconfig/keyboard`
KEYTABLE="fr-latin1"
MODEL="pc105+inet"
LAYOUT="fr"
Green diodWed, 18 Jan 2012 05:34:20 +0100https://ask.sagemath.org/question/8640/How to control layouts of individual plots within a graphics_array?https://ask.sagemath.org/question/8156/how-to-control-layouts-of-individual-plots-within-a-graphics_array/I am trying to plot two graphics side-by side from with an '@interact' function within the Sage notebook.
I define my graphics array and render it with the appropriate size as follows:
myGraphicsArray = graphics_array([myPlot1, myPlot2])
myGraphicsArray.show(figsize=[14,5])
This is fine, but how can I control features of the individual plots separately? (e.g. axis range, aspect ratio, maybe even relative sizes of the two plots etc.)
For now I have found a kludge workaround, which is to .show() the individual plots first of all (making them very small) within which I set the relevant layout parameters as follows:
myPlot1.show(ymin=-40,ymax=10,figsize=0.1) # note small figsize
myPlot2.show(xmin=-axisMax, xmax=axisMax, ymin=-axisMax, ymax=axisMax, aspect_ratio=1, figsize=0.1) # note small figsize
This is not ideal, as it plots them (albeit small) when I didn't really want to. But at least it allows me to control their respective layouts when they later appear within the graphics_array.
But is there a better way to do this?
deebs67Thu, 09 Jun 2011 10:42:41 +0200https://ask.sagemath.org/question/8156/Layouting of sage notebookhttps://ask.sagemath.org/question/7976/layouting-of-sage-notebook/Hi,
I want to take a printout of the notebook output. But since the eqns sage calculated are too large, it wrote the entire equation in a single line.
I am not able to take a printout of my notebook because of this single line output.
Is there any way, I can make sage output the results in a specified width. So that I can take printout on normal A4 Size papers?
Thanking in advance.
-indiajoe
Update:
The notebook I am having trouble is the one in the following published page.
http://480.sagenb.org/home/pub/60/
The notorious long eqn is the one at the end of the first cell. I am not able to make them print in multiple lines.indiajoeMon, 28 Feb 2011 08:08:54 +0100https://ask.sagemath.org/question/7976/Notebook text and figure layout controlhttps://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 10:56:02 +0100https://ask.sagemath.org/question/7952/