Making Jupyter Dark Mode Great!

Making Jupyter Dark Mode Great!

Jupyter is one of my favorite tool these days. I love the dark mode Theme on it. The following are some of the awesome tweaks I have done to make it cool. If you are spending a lot of time on this tool, make it the best!

  1. Install Jupyter Theme, use instructions from here and choose the Monokai theme and run the following from the terminal ?

jt -t monokai -f fira -fs 13 -nf ptsans -nfs 11 -N -kl -cursw 5 -cursc r -cellw 95% -T

This results in this

Image for post

If you are using Dark Reader or other Browser extension play around with its setting as its settings will interfere with Jupyter?s, I have set up a rule to turn it off for my Notebooks

2. Install Notebook Extensions use from here and enable the following

a. Hinterland ? Code Complete

b. Scratchpad ? Single Cell Test/Run like ls or pwd or just some list comprehension

c. Autopep8 ? format code to look pretty

d. Table Beautifier ? as the name suggests

which results in this

Image for post

3. The graphs and plots can sometimes mess up if you are using dark mode from the themes above, as shown below here, notice the axes are not clear here ?

Image for post

But, here is a hack for it

Make a file named 00_startup.py in ~/.ipython/profile_default/startup and stick the following snippet into it, and restart Jupyter, details are here

import osimport pandas as pdimport numpy as npimport matplotlib.pyplot as pltimport seaborn as sns

from jupyterthemes import jtplotjtplot.style(theme=?monokai?, context=?notebook?, ticks=True, grid=False)

Image for post

And you are all done, Enjoy your deep data dives!

No Responses

Write a response