I programmatically provide required input files to GNUPlot executable and invoke it using system()
function. It is suitable to my situation since I only want to visualize my data during research. But if you want the plotting functionality integrated into your executable file, maybe this is not for you :)