jupyter notebook theme

修改 jupyter notebook 的主题,字体,字号

pip install jupyterthemes
jt -l
jt -t oceans16 -f anonymous -fs 12 -cellw 90% -ofs 11 -dfs 11 -T

theme

  • chesterish
  • grade3
  • gruvboxd
  • gruvboxl
  • monokai
  • oceans16
  • onedork
  • solarizedd
  • solarizedl

Set Plotting Style (from within notebook)

jtplot.style() makes changes to matplotlib’s rcParams dictionary so that figure aesthetics match those of a chosen jupyterthemes style. In addition to setting the color scheme, jtplot.style() allows you to control various figure properties (spines, grid, font scale, etc.) as well as the plotting “context” (borrowed from seaborn).

Note, these commands do not need to be re-run every time you generate a new plot, just once at the beginning of your notebook or whenever style changes are desired after that.

Pro-tip: Include the following two lines in ~/.ipython/profile_default/startup/startup.ipy file to set plotting style automatically whenever you start a notebook:

# import jtplot submodule from jupyterthemes
from jupyterthemes import jtplot

# currently installed theme will be used to
# set plot style if no arguments provided
jtplot.style()

jtplot.style() Examples

# import jtplot module in notebook
from jupyterthemes import jtplot

# choose which theme to inherit plotting style from
# onedork | grade3 | oceans16 | chesterish | monokai | solarizedl | solarizedd
jtplot.style(theme='onedork')

# set "context" (paper, notebook, talk, poster)
# scale font-size of ticklabels, legend, etc.
# remove spines from x and y axes and make grid dashed
jtplot.style(context='talk', fscale=1.4, spines=False, gridlines='--')

# turn on X- and Y-axis tick marks (default=False)
# turn off the axis grid lines (default=True)
# and set the default figure size
jtplot.style(ticks=True, grid=False, figsize=(6, 4.5))

# reset default matplotlib rcParams
jtplot.reset()

Monospace Fonts (code cells)

-f arg Monospace Font
anka Anka/Coder
anonymous Anonymous Pro
aurulent Aurulent Sans Mono
bitstream Bitstream Vera Sans Mono
bpmono BPmono
code Code New Roman
consolamono Consolamono
cousine Cousine
dejavu DejaVu Sans Mono
droidmono Droid Sans Mono
fira Fira Mono
firacode Fira Code
generic Generic Mono
hack Hack
hasklig Hasklig
inconsolata Inconsolata-g
inputmono Input Mono
iosevka Iosevka
liberation Liberation Mono
meslo Meslo
office Office Code Pro
oxygen Oxygen Mono
roboto Roboto Mono
saxmono saxMono
source Source Code Pro
sourcemed Source Code Pro Medium
ptmono PT Mono
ubuntu Ubuntu Mono

Sans-Serif Fonts

-nf/-tf arg Sans-Serif Font
opensans Open Sans
droidsans Droid Sans
exosans Exo_2
latosans Lato
ptsans PT Sans
robotosans Roboto
sourcesans Source Sans Pro

Serif Fonts

-nf/-tf arg Serif Font
loraserif Lora
ptserif PT Serif
georgiaserif Georgia
cardoserif Cardo
crimsonserif Crimson Text
ebserif EB Garamond
merriserif Merriweather
neutonserif Neuton
goudyserif Sorts Mill Goudy
recent article

Vim for latex

最近 Vim 和 LaTex 用的都比较多,如果你也经常使用 Vim来编辑 LaTex 文档,不妨尝试一下。快捷键 = 自动格式化对齐样式,对于有代码洁癖强迫症的人来说绝对是福音。 gq家族 根据 textwidth 自动换行。gqgq: 换行当前段。gqap: 格式化整个段。{Visual}gq: 格式化选定的部分。对于每行字符数量不能超过 80 的人来说,又一个福音。最后你的文章会非常整齐,就像这样: Vim (an acronym for Vi IMproved) is a...…

computer science vim latex blogread
previous article

tensorflow share parameter

tf.Variable()定义变量tf.Variable( initial_value=None,# 第一个参数是必填参数 trainable=True, collections=None, validate_shape=True, caching_device=None, name=None, variable_def=None, dtype=None, expected_shape=None, import_scope=Non...…

computer science deep learning tensorflow blogread