pythonseaborncolorbrewer

Seaborn color brewer not interactive


I am trying to use Seaborn's interactive color brewer tool in Jupyter, however I am struggling to figure out how to use it interactively. Currently, it is just providing me with defaults.

Seaborn color brewer


Solution

  • Seaborn's interactive choose_colorbrewer_palette tool requires ipywidgets (or IPython.html.widgets). In order to be able to use those widgets in jupyter you need to activate them

    jupyter nbextension enable --py widgetsnbextension
    

    For use in jupyter lab you also need to install the JupyterLab Extension

    jupyter labextension install @jupyter-widgets/jupyterlab-manager
    

    This requires nodejs to be installed.

    So a complete install in conda may look like

    > conda install seaborn juypter jupyterlab ipywidgets nodejs
    > jupyter nbextension enable --py widgetsnbextension
    > jupyter labextension install @jupyter-widgets/jupyterlab-manager
    

    The starting jupyter lab

    > juypter lab
    

    and typing in the code from the question works as expected.

    enter image description here