mots quotidiens.
Daichi Mochihashi (持橋大地) daichi <at> ism.ac.jp by hns, version 2.10-pl1.

先月 2013年07月 来月
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31

2013年07月08日(月) [n年日記]

#1 Matplotlib memo

Pythonが大体使えるようになったので, 綺麗なプロットを作れる Matplotlib を使ってみていますが(ずっと前に Bayes Wiki に書きましたが), 細かい調整の設定が超わかりにくいので, 自分用メモ。 以下, from pylab import * 後です。 なお, 軸の左と下だけを残したい場合は多いと思うので,
def simpleaxis():
    ax = gca().axes
    ax.spines['top'].set_visible(False)
    ax.spines['right'].set_visible(False)
    ax.get_xaxis().tick_bottom()
    ax.get_yaxis().tick_left()
という関数を Python のライブラリに書いて使っています。


1 days displayed.
タイトル一覧
カテゴリ分類
 なかのひと
Powered by hns-2.10-pl1, HyperNikkiSystem Project