✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🐇 Announcing Dash VTK for 3d simulation graphics. Check out the March webinar.

Make plotly graphs automatically adadpt to JupyterLab theme

Hi there, just a quick question, should be simple to answer I guess^^

I was wondering is there is a way to make plotly graphs automatically adapt to JupyterLab theme for example when running the first cell.
Something like:

pio.templates.default = 'jupyterlab_theme'

Of course it would be even better if it could adapt directly, but not really necessary for me.

Thanks, and continue the amazing work you are doing with the plotly library :wink:

Cheers, Alex

Hi @Alexboiboi,

I really like this idea, though it would take a bit of work. The challenge is that Jupyter’s architecture is designed so that a kernel can’t directly ask which front-end it’s running in (e.g. IPython console, QtConsole, classic notebook, JupyterLab, etc.). The way around this, for JupyterLab, is to make this information available to the kernel from a JupyterLab extension.

I added an issue comment with the idea at https://github.com/plotly/plotly.py/issues/1473#issuecomment-479872266. Feel free to chime in to add any other thoughts you have on the idea!

-Jon

Hi @jmmease, @Alexboiboi,

Any news about this topic?