gnuplot def/.append style={prefix="subdir/\jobname1-"}, % does not work
        gnuplot/.append style={prefix="subdir/\jobname2-"}, % does not work
       \addplot[blue, samples = 100, smooth]
           gnuplot[id = exp, prefix="subdir/\jobname-", domain = 0:.05]
               {1 - exp(-\z*\w*x)/sqrt(1 - \z^2)*sin(\w*x*sqrt(1 - \z^2) + 1/cos(\z))};
       \addplot[blue, samples = 100, smooth]
           gnuplot[id = exp, domain = 0:.05]
               {1 - exp(-\z*\w*x)/sqrt(1 - \z^2)*sin(\w*x*sqrt(1 - \z^2) + 1/cos(\z))};

The prefix setting works when specified within the \addplot gnuplot[prefix=] command. However, I could not figure out to set this for all \addplot gnuplot commands.

Most likely following closed question asks the same: TikZ and Gnuplot: Put all *.gunplot and *.table in a customized folder

Relevant question: bodegraph on Ubuntu 10.04

Afaik, the subfolder has to be created manually.

1 Answer 1


Ok, that wasn't too complicated:

Putting following into the preamble does it:


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.