matplotlibにてrasterized=Trueとすると, 背景が真っ黒になる
matplotlibにてrasterized=Trueとすると, 背景が真っ黒になる.
環境はubuntu14.04.
(12.04の時は特に問題なかったのに...)
以下の画像は, 1枚目がpngファイルで出力, 2枚目がepsファイルで出力した時の結果.
(ただし, epsファイルをアップロード出来なかったので, pngに変換している)
ググってみると, matplotlibのバージョンを更新すれば解決できるみたい.
$sudo pip install --upgrade matplotlib
しかし, 次のようなエラーがでた:
===========================================================================
* The following required packages can not be built:
* freetype
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/matplotlib
Storing debug log for failure in /home/ryoji/.pip/pip.log
freetypeがないらしいので, インストール:
$sudo apt-get install libfreetype6-dev
再度更新すると, うまくインストールできた & rasterizedの問題が修正された.
$sudo pip install --upgrade matplotlib