2

I would like to assign gnuplot to .gnuplot files (gnuplot scripts) on Windows 8.1, in such a way that the gnuplot environment starts with the script file loaded.

For this I would need to pass the path of script file to wgnuplot_pipes.exe. Unfortunately I cannot find any documentation about gnuplot command line arguments on Windows.

The closest I could find is a way to automatically render a .gnuplot file from the command line:

wgnuplot_pipes.exe -persist test.gnuplot
2

1 Answer 1

1

In general in gnuplot there are at least 5 mode to make persistent the execution of a script, from inside and from command line

  1. Put a pause -1 after the plot command in the file, or at the file end.
  2. Use command gnuplot filename.gp - (yes, dash is the last parameter) to stay in the interactive regime when the script completes.
  3. Run gnuplot as gnuplot -persist
  4. On Windows you can also use either gnuplot -persist or gnuplot /noend.
  5. Give the persist option as part of the set terminal command. e.g. set terminal wxt enhanced **persist**

As you can notice some of them are inside the script and are not operative system dependent, some other have to be used following the general rules for associating files to extension on each specific subversion of Windows.
If you are not able to pass parameter to the program associated with gnuplot.exe, maybe because a lack of privilege (if restricted to the Administrator), you can always modify the script inside following [1] or [5].

Some references and notes:

1
  • You're welcome. I forgot the #6, that works under Linux. To make executable the script "chmod u+x myscript.gnuplot" and to add as a shebang the 1st line #!/usr/bin/gnuplot -persist. The path depends from the system.
    – Hastur
    Apr 28, 2015 at 16:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .