0

MWE:

\documentclass{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.12}
\pgfmathsetmacro\z{0.403713}
\pgfmathsetmacro\w{343.386319715305}
\begin{document}
\begin{tikzpicture}[
        gnuplot def/.append style={prefix="subdir/\jobname1-"}, % does not work
        gnuplot/.append style={prefix="subdir/\jobname2-"}, % does not work
        ]
    \begin{axis}
       \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))};
    \end{axis}
    \begin{axis}
       \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))};
    \end{axis}
\end{tikzpicture}
\end{document}

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

Note:
Afaik, the subfolder has to be created manually.

1 Answer 1

0

Ok, that wasn't too complicated:

Putting following into the preamble does it:

\tikzset{prefix=subdir/\jobname3-}

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.