So you've been using Jupyter notebooks for a while now and the default light theme is starting to make you feel like a vampire. Fear not, my friend! I have just the solution for you.
Enter the "jupyter-themes" library - a free and open-source tool that lets you install and customize themes to your heart's content. You can find the github repo here: https://github.com/dunovank/jupyter-themes
To get started, all you need to do is run a few lines of code in your terminal. If you're using conda, just copy and paste the following:
conda install -c conda-forge jupyterthemes
conda install -c conda-forge/label/gcc7 jupyterthemes
conda install -c conda-forge/label/cf201901 jupyterthemes
Once you've installed the library, you can start customizing your Jupyter notebook with a plethora of command line options. Here's my go-to configuration:
jt -t grade3 -f roboto -fs 115 -tf merriserif -tfs 11 -nf ptsans -nfs 12 -cellw 75% -lineh 170
This will give you a sleek and modern-looking notebook with crisp fonts and plenty of room to code comfortably.
But wait, there's more! You can also customize your plot styles using "jtplot" from the same library. Check out some of these examples:
# import jtplot module in notebook
from jupyterthemes import jtplot
jtplot.style(theme='onedork', context='talk', fscale=1.4, spines=False, gridlines='--')
# reset default matplotlib rcParams
jtplot.reset()
This is how grade3 theme looks like:
Pretty cool, right? You can easily switch up your theme and plot styles depending on your mood and preferences.
And just in case you ever want to revert back to the default notebook theme, simply run the following command and refresh your notebook:
jt -r
Easy peasy! Now you can code in style and feel like a boss. Give it a try and let me know what you think.