0

I have a C program running in 64-bit Xubuntu 14.04 that computes a bunch of things and then plots the result in GNUplot using the system() command to run the GNUPlot script. The script plots the data to a .eps file, but I'd like to change that to a popup window.

Is there a way that I can have the plot display this popup window and update it every time that the new plot is generated (i.e. when the data is computed and the GNUplot script is called)?

user2742907
  • 87
  • 1
  • 11
  • Have you seen this http://stackoverflow.com/questions/3521209/making-c-code-plot-a-graph-automatically ? Look at this too http://ndevilla.free.fr/gnuplot/ Does it help you ? – francis Oct 19 '14 at 17:43
  • I can already call gnuplot scripts from my program, I don't need a C interface with gnuplot. If I run a script from within C, it closes after the script has finished executing, which I want to prevent from happening. – user2742907 Oct 19 '14 at 19:45
  • 2
    Got it, calling the plot script with `system("gnuplot plot_script.txt -persist')` will cause the plot window to remain. I still need to add a function that closes the old plot when the new one is about to be generated though. – user2742907 Oct 19 '14 at 20:00

0 Answers0