Professional Documents
Culture Documents
Follow 568K Followers · Editors' Picks Features Deep Dives Grow Contribute About
You have 1 free member-only story left this month. Sign up for Medium and get an extra one
https://towardsdatascience.com/customize-your-jupyter-notebook-theme-in-2-lines-of-code-fc726cea1513 1/12
13/08/2021 Customize your Jupyter Notebook Theme in 2 lines of code | by Satyam Kumar | Towards Data Science
T
he interface themes define the appearance of the windows, buttons,
toolbar, cells, and all visual elements of the user interface. By default,
Jupyter Notebook uses the light theme. Some of the programmers or data
https://towardsdatascience.com/customize-your-jupyter-notebook-theme-in-2-lines-of-code-fc726cea1513 2/12
13/08/2021 Customize your Jupyter Notebook Theme in 2 lines of code | by Satyam Kumar | Towards Data Science
Jupyter Notebook does not come up with an inbuilt option to change the
theme of the notebook. In this article, you can read how to change the
theme of your jupyter notebook, enable/disable toolbars, and customize
your notebook according to your need.
Installation:
Jupyter themes is an open-source library developed by Kyle Dunovan
used to change themes, plotting style, fonts in the jupyter notebook. You
can install Jupiter themes using pip:
# install jupyterthemes
https://towardsdatascience.com/customize-your-jupyter-notebook-theme-in-2-lines-of-code-fc726cea1513 3/12
13/08/2021 Customize your Jupyter Notebook Theme in 2 lines of code | by Satyam Kumar | Towards Data Science
# upgrade to latest version
Jupyter Themes:
By default, Jupyter Notebook uses a light theme as mentioned in the below
image. Notebook themes are customizable along with toolbars, text and
code fonts, and other elements of the user interface. To view the list of
available themes in jupyterthemes package use command line usage !jt -
l:
https://towardsdatascience.com/customize-your-jupyter-notebook-theme-in-2-lines-of-code-fc726cea1513 4/12
13/08/2021 Customize your Jupyter Notebook Theme in 2 lines of code | by Satyam Kumar | Towards Data Science
https://towardsdatascience.com/customize-your-jupyter-notebook-theme-in-2-lines-of-code-fc726cea1513 5/12
13/08/2021 Customize your Jupyter Notebook Theme in 2 lines of code | by Satyam Kumar | Towards Data Science
To restore the default theme of the notebook, run the command line
statement as !jt -r
https://towardsdatascience.com/customize-your-jupyter-notebook-theme-in-2-lines-of-code-fc726cea1513 6/12
13/08/2021 Customize your Jupyter Notebook Theme in 2 lines of code | by Satyam Kumar | Towards Data Science
To change the theme and enable the toolbar, filename, logo, kernel logo in
same command line statement: !jt -t [theme name] -T -N -kl
Change Fonts:
Jupyter themes provide features to change code font, code font size,
notebook font, notebook font size, pandas data frame font size, etc.
(Image by Author),
https://towardsdatascience.com/customize-your-jupyter-notebook-theme-in-2-lines-of-code-fc726cea1513 7/12
13/08/2021 Customize your Jupyter Notebook Theme in 2 lines of code | by Satyam Kumar | Towards Data Science
!jt [-h] [-l] [-t THEME] [-f MONOFONT] [-fs MONOSIZE] [-nf NBFONT]
https://towardsdatascience.com/customize-your-jupyter-notebook-theme-in-2-lines-of-code-fc726cea1513 8/12
13/08/2021 Customize your Jupyter Notebook Theme in 2 lines of code | by Satyam Kumar | Towards Data Science
[-cellw CELLWIDTH] [-lineh LINEHEIGHT] [-altp] [-altmd]
https://towardsdatascience.com/customize-your-jupyter-notebook-theme-in-2-lines-of-code-fc726cea1513 9/12
13/08/2021 Customize your Jupyter Notebook Theme in 2 lines of code | by Satyam Kumar | Towards Data Science
Note:
jtplot style commands need to run just once in the notebook, not
every time before generating the plot
Conclusion:
Jupyter themes library is used to customize the visual elements of the user
interface. It can be used to modify plots created through matplotlib. With
https://towardsdatascience.com/customize-your-jupyter-notebook-theme-in-2-lines-of-code-fc726cea1513 10/12
13/08/2021 Customize your Jupyter Notebook Theme in 2 lines of code | by Satyam Kumar | Towards Data Science
the jupyterthemes library, you can take your visualization to the next level.
References:
[1] Jupyter Themes GitHub repo: https://github.com/dunovank/jupyter-
themes
Every Thursday, the Variable delivers the very best of Towards Data Science: from
hands-on tutorials and cutting-edge research to original features you don't want to
miss. Take a look.
https://towardsdatascience.com/customize-your-jupyter-notebook-theme-in-2-lines-of-code-fc726cea1513 11/12
13/08/2021 Customize your Jupyter Notebook Theme in 2 lines of code | by Satyam Kumar | Towards Data Science
https://towardsdatascience.com/customize-your-jupyter-notebook-theme-in-2-lines-of-code-fc726cea1513 12/12