Fine tune up

Plot script was generalized. Computation of the degree of freedom was
changed.