change structure fact caculation subroutine and some gnuplot commands