0

I am using Latex on Windows 10 with TexLive 2024. Latex documents are created with the TexWorks editor that comes with TexLive. I have installed Gnuplot and entered it in the path during installation. It works fine. In TexWorks I have created in the Menu > Edit > Preferences > Typesetting > Processing Tool > and added an entry with the following settings:

  • Name: gnuplot
  • Program: C:/Program Files/gnuplot/bin/gnuplot.exe
  • Arguments: $basename

I have now created the following Latex file named untitled-1.tex

\documentclass{article}
\usepackage{gnuplottex}
\begin{document}
\section{Gnuplot}
\begin{gnuplot}[terminal=pdf]
%set terminal pdf
%set output "untitled-1.pdf"
plot sin(x)
\end{gnuplot}
\end{document}

First in TexWorks I first run LuaLatex which is fine. Next, in TexWorks I run gnuplot which now stops and comes up with the following message: line 0: Cannot load input from 'untitled-1'. A file called untitled-1-gnuplottex-fig1.gnuplot was created though. I have also changed the arguments to $basename-*.gnuplot but it makes no difference.

Thanks

3
  • I prefer to make my figures in GnuPlot itself and then import them into Latex documents. I have had too many weird border and whitespace problems with contour plots to risk inlining anything but the most trivial graphic plot in this fashion. YMMV Commented Feb 16 at 12:08
  • The space in the path C:/Program Files/gnuplot/bin/gnuplot.exe is very likely to create problems. Can you maybe try to install gnuplot somewhere else in a path without space and let us know what the result is? Commented Feb 16 at 15:59
  • @theozh even with gnuplot installed under c:\gnuplot with that folder added to the path, the result is the same Commented Feb 17 at 7:33

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.