ユーザ用ツール

サイト用ツール


サイドバー

matplotlib

日本語の入力

最初におまじないを唱える

import matplotlib
from matplotlib.font_manager import FontProperties
 
font_path = '/usr/share/fonts/opentype/ipafont-gothic/ipagp.ttf'
font_prop = FontProperties(fname=font_path)
matplotlib.rcParams['font.family'] = font_prop.get_name()

フォントは以下のコマンドで探せる.下記はipaフォントを探す場合.

fc-list|grep -i ipa
matplotlib.txt · 最終更新: 2017/10/03 13:13 by saito