Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

jupyterlab bug with interact-slider?

Is this my build or a bug?
The slider works in jupyter but not in my jupyterlab.
Code, cribbed from 'test-display.ipynb' (which I can't find the online source for, but that's where I got it)

%display latex 
version()

--

@interact
def _(a = slider([1..10]),
          color=Color('red'),
          axes=checkbox(True, 'Show axes'),
          x_label=input_box('$x$', 'x-label', str),
          y_label=input_box('$y$', 'y-label', str)):
          viewer='threejs'
          axes_labels = [x_label, y_label] if axes else None
          show(plot(cos(a*x), (x, 0, 2*pi), color=color, thickness=2),
          axes=axes, axes_labels=axes_labels)

Ubuntu Mate 22.04
Kernel Linux 5.15.0-40-generic x86_64
Processor: AMD A4-3300 APU with Radeon(tm) HD Graphics × 2
Compiled -- I still have the logs and such
There are some old online references to a similar problem, but I thought they were fixed.
I do like JupyterLab, but I also like sliders/buttons/widgets :)

jupyterlab bug with interact-slider?

Is this my build or a bug?
The slider works in jupyter but not in my jupyterlab.
Code, cribbed from 'test-display.ipynb' (which I can't find the online source for, but that's where I got it)'test_display.ipynb' https://nbviewer.org/github/egourgoulhon/SageMathTest/blob/master/Notebooks/test_display.ipynb

%display latex 
version()

--

@interact
def _(a = slider([1..10]),
          color=Color('red'),
          axes=checkbox(True, 'Show axes'),
          x_label=input_box('$x$', 'x-label', str),
          y_label=input_box('$y$', 'y-label', str)):
          viewer='threejs'
          axes_labels = [x_label, y_label] if axes else None
          show(plot(cos(a*x), (x, 0, 2*pi), color=color, thickness=2),
          axes=axes, axes_labels=axes_labels)

Ubuntu Mate 22.04
Kernel Linux 5.15.0-40-generic x86_64
Processor: AMD A4-3300 APU with Radeon(tm) HD Graphics × 2
Compiled -- I still have the logs and such
There are some old online references to a similar problem, but I thought they were fixed.
I do like JupyterLab, but I also like sliders/buttons/widgets :)

jupyterlab bug with interact-slider?

Is this my build or a bug?
The slider works in jupyter but not in my jupyterlab.
Code, cribbed from 'test_display.ipynb' https://nbviewer.org/github/egourgoulhon/SageMathTest/blob/master/Notebooks/test_display.ipynb

%display latex 
version()

--

@interact
def _(a = slider([1..10]),
          color=Color('red'),
          axes=checkbox(True, 'Show axes'),
          x_label=input_box('$x$', 'x-label', str),
          y_label=input_box('$y$', 'y-label', str)):
          viewer='threejs'
          axes_labels = [x_label, y_label] if axes else None
          show(plot(cos(a*x), (x, 0, 2*pi), color=color, thickness=2),
          axes=axes, axes_labels=axes_labels)

Ubuntu Mate 22.04
Kernel Linux 5.15.0-40-generic x86_64
Processor: AMD A4-3300 APU with Radeon(tm) HD Graphics × 2
Compiled -- I still have the logs and such
There are some old online references to a similar problem, but I thought they were fixed.
I do like JupyterLab, but I also like sliders/buttons/widgets :)