2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Jupyter Notebookのテーマカラーをかんたんに変更できる!

Last updated at Posted at 2019-02-09

Jupyter Notebookのテーマカラーが変えられることに気づき(遅い…)、
さっそく、目にやさしくダークカラーに変えましたので、やり方をご共有まで。

こちらのページをママ参考にしています、ありがとうございます!

STEP1

コマンドプロンプトで、以下を入力し。これでインストール完了。

pip install jupyterthemes

STEP2

どんなテーマが選べるのかなー?テーマカラー一覧が以下で出せます。

$ jt -l

STEP3

テーマカラーを以下で変更!(評判がよい「monokai」を今回はチョイス)

jt -t monokai

STEP4

テーマカラー以外にも、フォントやツールバー表示なども設定できます。
「-f ●●(フォント名)」:フォント名を変更
「-T」:ツールバー表示
「-N」:ノート名表示

たとえば、こんな感じで

jt -t monokai -f inconsolata -N -T 

STEP5

さいごに、ダークカラーにすると、グラフの縦軸横軸の表示が見えなくなってしまうので、
これは都度でめんどうですが、Jupyter Notebook上で、
以下をpandasとかのimportと同じタイミングで実行させておくと解消されます。

custom_style = {'axes.labelcolor': 'black',
                'xtick.color': 'black',
                'ytick.color': 'black'}
sns.set_style("darkgrid", rc=custom_style)

どんどんJupyter Notebookの環境を使いやすくしていきたいなー

2
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?