Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Interact layout in Jupyter

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.

click to hide/show revision 2
retagged

Interact layout in Jupyter

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.

click to hide/show revision 3
None

Interact layout in JupyterJupyter-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.