LoginSignup
0
3

More than 3 years have passed since last update.

【メモ】PCのJupyter Notebookを等幅フォント表示にする (Mac)

Posted at

はじめに

PCで動かすJupyter Notebookは、フォントがデフォルトでプロポーショナルになっているため、出力がガタガタしてなにかと不便。これを等幅フォントに変えるための手順です。
動作確認はMacでしています。

手順

ターミナルを立ち上げて、以下のコマンドを実行します。

$ cd ~/.jupyter
$ mkdir custom
$ cd custom
$ echo '.CodeMirror pre, .output pre { font-family: Monaco, monospace; }' > custom.css

この状態で

$ Jupiter notebook

とすると、numpyの行列も次のようにきれいに表示されます。

スクリーンショット 2020-09-25 9.29.39.png

ご参考までに、上記のコードは私の著作「Pythonで儲かるAIをつくる」の実習コードの一部です。
他のコードを含めて下記リンク先にアップされていますので、関心ある方は参照されて下さい。

0
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
0
3