2015/01/14

pyplot を使わずに全て モジュールは import で済ませよう
Using pylib module should not be recommended to import since it sometimes conflicts some function name definitions. Importing each module is much more straightforward.

import numpy as np; import scipy as sp; import pyfits as pf; import math as m; import matplotlib.pyplot as pl

あと、pyplot の show() 関数で図を呼び出すと終了するためには ctrl + c とするしかできなさそうで面倒。
その場合、 draw() 関数を用いるとよい

If you want to return the prompt just after plotting the figure, you should use "draw()" function instead of "show()" function.

---- 2014.01.16 追記 ----
どうやら、drawはあまりよい方法ではないのかもしれない。
ion()
として、インタラクティブモードとやらをONにすれば一つの画面に書き足してゆく感じで次々と描画できるっぽい。

It seems that draw() function is not work along my request correctly.
usage of ion() function which turns on an interactive mode(?) is favorable before drawing figures.

0 件のコメント: