[PYTHON] How to change Jupyter layout

Install the required libraries

Install jupyter themes using the pip command.

terminal


$ pip install jupyterthemes

Show list of themes

The following command will show which themes are included.

terminal


$ jt -l
Available Themes: 
   chesterish
   grade3
   monokai
   oceans16
   onedork
   solarizedd
   solarizedl

Theme settings

The command when using the theme is as follows. As for the option, -T adds a toolbox. -N is an option to give the name of the notebook. You need to restart Jupyter notebook for the theme to take effect.

terminal


$ jt -t chesterish -T -N

To see help

The command when using the theme is as follows. As for the option, -T adds a toolbox. -N is an option to give the name of the notebook.

terminal


$ jt -h
usage: jt [-h] [-l] [-t THEME] [-f MONOFONT] [-fs MONOSIZE] [-nf NBFONT]
          [-nfs NBFONTSIZE] [-tf TCFONT] [-tfs TCFONTSIZE] [-dfs DFFONTSIZE]
          [-ofs OUTFONTSIZE] [-m MARGINS] [-cursw CURSORWIDTH]
          [-cursc CURSORCOLOR] [-cellw CELLWIDTH] [-lineh LINEHEIGHT] [-altp]
          [-altmd] [-P] [-T] [-N] [-vim] [-r] [-dfonts]

optional arguments:
  -h, --help            show this help message and exit
  -l, --list            list available themes
  -t THEME, --theme THEME
                        theme name to install
  -f MONOFONT, --monofont MONOFONT
                        monospace code font
  -fs MONOSIZE, --monosize MONOSIZE
                        code font-size
  -nf NBFONT, --nbfont NBFONT
                        notebook font
  -nfs NBFONTSIZE, --nbfontsize NBFONTSIZE
                        notebook fontsize
  -tf TCFONT, --tcfont TCFONT
                        txtcell font
  -tfs TCFONTSIZE, --tcfontsize TCFONTSIZE
                        txtcell fontsize
  -dfs DFFONTSIZE, --dffontsize DFFONTSIZE
                        pandas dataframe fontsize
  -ofs OUTFONTSIZE, --outfontsize OUTFONTSIZE
                        output area fontsize
  -m MARGINS, --margins MARGINS
                        fix margins of main intro page
  -cursw CURSORWIDTH, --cursorwidth CURSORWIDTH
                        set cursorwidth (px)
  -cursc CURSORCOLOR, --cursorcolor CURSORCOLOR
                        cursor color (r, b, g, p)
  -cellw CELLWIDTH, --cellwidth CELLWIDTH
                        set cell width (px)
  -lineh LINEHEIGHT, --lineheight LINEHEIGHT
                        code/text line-height (%)
  -altp, --altprompt    alt input prompt style
  -altmd, --altmarkdown
                        alt markdown cell style
  -P, --hideprompt      hide cell input prompt
  -T, --toolbar         make toolbar visible
  -N, --nbname          nb name/logo visible
  -vim, --vimext        toggle styles for vim
  -r, --reset           reset to default theme
  -dfonts, --defaultfonts
                        force fonts to browser default

Introduction of each theme

I will introduce the layout of each theme.

chesterish

terminal


$ jt -t chesterish -T -N
スクリーンショット 2017-08-29 6.20.45.png

grade3

terminal


$ jt -t grade3 -T -N
スクリーンショット 2017-08-29 6.36.35.png

monokai

terminal


$ jt -t monokai -T -N
スクリーンショット 2017-08-29 6.38.01.png

oceans16

terminal


$ jt -t oceans16 -T -N
スクリーンショット 2017-08-29 6.39.05.png

onedork

terminal


$ jt -t onedork -T -N
スクリーンショット 2017-08-29 6.40.21.png

solarizedd

terminal


$ jt -t solarizedd -T -N
スクリーンショット 2017-08-29 6.41.20.png

solarizedl

terminal


$ jt -t solarizedl -T -N
スクリーンショット 2017-08-29 6.42.17.png

Recommended Posts

How to change Jupyter layout
How to change Python version
How to use Jupyter Notebook
[Ansible] How to prevent forced change
How to change vim color scheme
How to execute commands in jupyter notebook
How to use jupyter notebook with ABCI
Jupyter Notebook Basics of how to use
How to use Jupyter notebook [Super Basic]
How to change editor color in PyCharm
How to debug with Jupyter or iPython Notebook
[Python] How to change the date format (display format)
How to make multiple kernels selectable on Jupyter
How to Git from GCP's Jupyter Lab to GSR
How to use xml.etree.ElementTree
How to use Python-shell
How to use tf.data
How to use virtualenv
Scraping 2 How to scrape
How to use Seaboan
How to use image-match
How to use shogun
How to install Python
How to use Pandas 2
How to install pip
How to use Virtualenv
How to use numpy.vectorize
How to update easy_install
How to install archlinux
How to use pytest_report_header
Convert jupyter to py
How to restart gunicorn
How to install python
How to virtual host
How to debug selenium
How to use partial
How to use Bio.Phylo
How to read JSON
How to use SymPy
How to use x-means
How to use WikiExtractor.py
How to update Spyder
How to use IPython
How to install BayesOpt
How to use virtualenv
How to use Matplotlib
How to use iptables
How to use numpy
How to use TokyoTechFes2015
How to use venv
How to use dictionary {}
How to use Pyenv
How to grow dotfiles
How to use list []
How to use python-kabusapi
"How to count Fukashigi"
How to install Nbextensions
How to use OptParse
How to use return
How to install Prover9
How to use dotenv