add  gnuplot script and generation of data in main.cpp