Default dark theme for matplotlib
Closed this issue · 2 comments
It is a feature request.
I used to use jupyter-themes for old jupyter notebooks. It had a feature to make plots dark too with similar colors as the notebook theme.
It would be great to have this feature in theme-darcula.
The only good way to switch matplotlib into dark mode/theme is by calling in Python:
import matplotlib.pyplot as plt
plt.style.use('dark_background')
In other words, if you want dark theme plots in a notebook, you have to call the above lines in the Python kernel that's running in the notebook (ie run the above lines in a notebook cell). So in order to implement this correctly, you'd have to change how Jlab initializes all of it's kernels and make it dependent on the theme. Which could be an interesting idea, but will require changes to Jlab core.
So for now I'm gonna say this is a "will not implement". I'd recommend you open a related issue on the jupyterlab/jupyterlab
tracker. There would have to be some discussion about this (eg what should happen to your existing plots when you change theme?), but maybe it can happen?
I am curious as to how this feature was implemented in the old jupyter-themes. I doubt there's any simple way to do it.
Ok, thanks. I could make it work with an IPython startup script placed into ~/.ipython/profile_default/startup .