Menu

#2846 Version 6.0 patchlevel 3

None
open
nobody
None
3 days ago
4 days ago
No

Version 6.0 patchlevel 3; Windows 10.

set loadpath 'C:\myGnuplots' to have all my saved <...>.gp and associated <>.dat files reside in C:\myGnuplots. With a data file Data.dat resident in C:\myGnuplots, plot 'Data.dat' u 1:2 with linespoints successfully executes. Subsequent save 'Data.gp' deposits the 'Data.gp' file in C:\myGnuplots. However, an attempt to regenerate the plot with load 'Data.gp' fails due to data missing. Interestingly enough, if I deposit the Data.dat file into ...\gnuplot\demo the load 'Data.gp' is successful. Tells me that my path to C:\myGnuplots gets lost in the save command somehow.

Discussion

  • Reinhard Neuwirth

    • Attachments has changed:

    Diff:

    --- old
    +++ new
    @@ -0,0 +1 @@
    +OA63565241_1_1.pdf (58.7 kB; application/pdf)
    
    • Group: -->
    • Priority: -->
     
  • Reinhard Neuwirth

    • Attachments has changed:

    Diff:

    --- old
    +++ new
    @@ -1 +0,0 @@
    -OA63565241_1_1.pdf (58.7 kB; application/pdf)
    
     
  • Ethan Merritt

    Ethan Merritt - 4 days ago

    Is there no "set loadpath" command at all in your save file, or is there a "set loadpath" command but it contains an incorrect path? It works under linux, but I don't have a Windows machine to test on, so I don't know if there is some Windows-specific problem with the save command.

     
  • Reinhard Neuwirth

    I use set loadpath 'C:\myGnuplots' via the access to Edit gnuplot.ini supplied by gnuplot. What works:
    (1) plotting: plot 'Data.dat' u 1:2 with linespoints successfully plots for Data.dat resident in C:\myGnuplots, not path needed.
    (2) save '<filename>.gp' places <filename>.gp in the C:\myGnuplots folder, again, no path needed.
    However, load '<filename>.gp' cannot find the data file. But to my surprise I found that If I now copy Data.dat into c:\Program Files\gnuplot\demo loading will regenerate the plot. Evidently the application sets GNUPLOT_LIB=C:\Program Files\gnuplot\demo;C:\Program Files\gnuplot\demo\games;C:\Program Files\gnuplot\share.

     
    • Ethan Merritt

      Ethan Merritt - 3 days ago

      First question: is there a 'set loadpath' command in the file <filename>.gpthat you saved?

      Second question: When you later issue the load '<filename>.gp command and it fails, is that in the same gnuplot session as you were in when you originally saved it? If not, is the new gnuplot session being run from the same user directory as original session? What does the new (failing) session report for show loadpath?

       
  • Reinhard Neuwirth

    Answer to question 1: yes. The file contains set loadpath 'C:\myGnuplots'.
    Anser to question 2: I saveed and loaded in the same gnuplot session.

     

Log in to post a comment.