Python のグラフライブラリmatplotlib はデフォルトだと日本語フォントではないため、日本語が正常に表示されません。 設定は簡単です。 まず現在読み込んでいる設定ファイルの位置を確認します。
Matplotlibで日本語を出力するのにかなり手間取ったのでメモ。 Windows, Python3を想定しています。 問題の説明 import matplotlib.pyplot as plt plt.figure() plt.xlabel('豆腐 - tofu') plt.title('豆腐 - TOFU') 日本語が文字化けして「□□」となってしまっています。日本語表示したいですね。 解決への道のり matplotlibの設定ファイルの場所を探す 日本語に対応したフォントのダウンロード matplotlibの設定ファイルを書き換える フォントのキャッシュの削除 matplotlibの設定ファイルの場所を探す import matplotlib matplotlib.matplotlib_fname() を実行してみてください。 あなたのmatplotlibが現在参照している設定ファ
Matplotlibで線を複数書くとき, 色がかぶってしまったりして面倒なことがある. そんなときはカラーマップを使うことで色を連続的に変化させていくことができる. import matplotlib.pylab as pylab import matplotlib.cm as cm x = numpy.arange(0.0, 1.01, 0.01) for _ in range(10): pylab.plot(x, _ * x, color=cm.hot(float(_) / 10)) という感じ. http://stackoverflow.com/questions/4389179/matplotlib-color-palette カラーマップはhot以外にもいくつかあるのでお好みのものをどうぞ. autumn, bone, cool, copper, flag, gray, hot,
Distribution Free Download* Register to get everything you need to get started on your workstation including Cloud Notebooks, Navigator, AI Assistant, Learning and more. Easily search and install thousands of data science, machine learning, and AI packages Manage packages and environments from a desktop application or work from the command line Deploy across hardware and software platforms Distrib
This shell script will build and install the Python scientific stack, including Numpy, Scipy, Matplotlib, IPython, Pandas, Statsmodels, Scikit-Learn, and PyMC for OS X 10.10 (Yosemite) using the Homebrew package manager and pip. The script will use recent development code from each package, which means that though some bugs may be fixed and features added, they also may be more unstable than the o
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く