简体   繁体   中英

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色料酿造机

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.

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM