Seaborn color brewer不互动

2024-04-20 11:09:16 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图使用Seaborn的互动色彩酿酒工具在Jupyter,但我正在努力找出如何使用它的互动。目前,它只是为我提供默认值。你知道吗

Seaborn color brewer


Tags: 工具jupyterseaborn色彩
1条回答
网友
1楼 · 发布于 2024-04-20 11:09:16

Seaborn的交互式choose_colorbrewer_palette工具需要ipywidgets(或IPython.html.widgets)。为了能够在jupyter中使用这些小部件,您需要激活它们

jupyter nbextension enable  py widgetsnbextension

要在jupyter实验室中使用,还需要安装JupyterLab扩展

jupyter labextension install @jupyter-widgets/jupyterlab-manager

这需要安装nodejs。你知道吗

因此,在康达的完整安装可能看起来像

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

启动jupyter实验室

> juypter lab

输入问题中的代码也能正常工作。你知道吗

enter image description here

相关问题 更多 >