#1134 setting epslatex output twice causes nonsensical bug

closed-invalid
nobody
None
5
2012-05-30
2012-05-25
Andrew Rasmussen
No

Running the attached script I get an error:
$ "./plot.plt", line 5: epslatex outputfile may not have dots inside their filenames before the extension .tex or .eps

This doesn't make sense because my output file doesn't have dots in the name before the .tex extension. It works fine if I just set the output once, to 'test.tex'. (I am outputting to /dev/null first so that I can capture the GPVAL parameters for my final plot.)

This was tested under Ubuntu 11.04/gnuplot 4.4p2 and Arch linux/gnuplot 4.6p0.

The script:
-----------------------------------
#!/usr/bin/gnuplot

set terminal epslatex
set output '/dev/null'
plot sin(x)
set output 'test.tex'
replot

Discussion

  • plot script epslatex bug

     
    Attachments
  • Ethan Merritt
    Ethan Merritt
    2012-05-30

    • status: open --> closed-invalid
     
  • Ethan Merritt
    Ethan Merritt
    2012-05-30

    The epslatex terminal needs two output files (one *.tex one *.eps). It uses the same base name but appends the two different extensions. However, you told it that one of the files was "/dev/null", which is not a normal file at all but a special device that does not accept file extensions. We can make the error message more helpful, but the underlying problem is that you can't create files in /dev/null. I suggest that you just give the "real" filename twice, letting the second plot command over-write the contents.