There are several ways to plot interactively in JupyterLab.
- Altair
- Plotly
- Bokeh
- ipywidgets
Between all the above, I found ipywidgets easier to use than the others.
To be able to use ipywidgets, some installations are needed:
- If we work in user mode in Linux, then clone the actual environment with:
- conda create –name mytorch –clone torch
- Activate the new environment:
- conda activate mytorch
- Install all necessary software such as Jupyter-Lab if needed:
- conda install -c conda-forge jupyterlab
- Then install the following:
- conda install -c conda-forge ipympl
- conda install -c conda-forge nodejs
- jupyter labextension install @jupyter-widgets/jupyterlab-manager
- jupyter lab build
- Then add “%matplotlib widget” to your jupyter notebook.
Enjoy it!
Be First to Comment