I want to create this graph in Texstudio. However, I have no clue about how to compile gnuplot using -shell-escape. If someone could help, I'd appreciate it.

| improve this question | | | | |

You need to go to Options->Configure TeXstudio..., Commands tab, and in the PdfLaTeX option you will see

pdflatex -synctex=1 -interaction=nonstopmode %.tex

then, you need to add the options there, like

pdflatex -synctex=1 -interaction=nonstopmode -shell-escape %.tex

then, click Ok. And the next execution of pdflatex should use that option.

You should see it in the log.

| improve this answer | | | | |
  • I added it and still, the code from that link doesn't compile. The error I get is: Package pgfplots Error: Sorry, the gnuplot-result file 'document.pgf-plot.tab<file>.gnuplot' manually on the respective gnuplot file.. ^^I^^Iplot 'data.txt' smooth sbezier;}; – Bill Mar 13 '17 at 18:27
  • try to compile the source in a command line pdflatex -shell-escape yourtexfile.tex and if that gives the same error the problem is your file, and not the configuration of TeXstudio. If not, then you need to post a MWE to reproduce your error. – adn Mar 13 '17 at 18:32
  • Just to make sure. Do you know if you have gnuplot? – Herb Schulz Mar 13 '17 at 19:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.