fix bug of ploting 2 dimension vector and change cat() to readline()