TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have been trying to get the tex package bodegraph working on my Ubuntu 10.04 machine. First off since Ubuntu ships with Texlive 2009 I had to uninstall the default version and manually install Texlive 2011.

I was then able to get bodegraph to output semilog grid lines, labels, and the like. The problem is when I try to actually plot a transfer function, and bodegraph has to use gnuplot. I get an error saying:

! I can't write on file `gnuplot/test/1.gnuplot'.

test.tex is the name of my input file and I am using pdflatex. I have a suspicion that this has something to do with pdflatex not having the permissions to run gnuplot or to write temp files where it wants to, but I have no clue where to start digging in.

Does anyone have any experience with bodegraph on Ubuntu, or have seen this problem before

EDIT - Include MWE






    ref lines/.style={thin,blue!60},
    ref points/.style={circle, black, opacity=0.7, fill, minimum size= 3pt, inner sep=0},
    every node/.style={font=small},
    bode lines/.style={very thick, blue},


% Breaks When The Following Line Is Added
\BodeAmp[ref lines, red!60]{-1:1.35}{POAmpAsymp{4}{2.0}+IntAmp{1}}


share|improve this question
Welcome to TeX.sx! You don't have to sign with your name since it automatically appears in the lower right corner of your post. I also took the liberty to format you post a little. See meta.tex.stackexchange.com/editing-help to see the available formatting – Martin Scharrer Oct 10 '11 at 16:43
Are you running pdflatex using -shell-escape? This is required to run shell commands. – Martin Scharrer Oct 10 '11 at 16:43
@MartinScharrer Thanks, I tried running pdflatex with the -shell-escape argument and I still receive the same error. – agoessling Oct 10 '11 at 17:43
Then I would suggest to add a minimal working example (MWE) that illustrates your problem. This way people can compile and test it by themselves. Also, please check the directory permissions on you machine. – Martin Scharrer Oct 10 '11 at 17:50
@MartinScharrer which directory? The directory of the test.tex or of the bodegraph package? – agoessling Oct 10 '11 at 18:40
up vote 6 down vote accepted

I got the same error on my machine (Ubuntu 11.04, TL 2011 vanilla). The bodegraph package seems to be configured by default to use the output prefix gnuplot/\jobname/ so the first plot in test.tex is written to gnuplot/test/1.gnuplot. However, you don't have neither a gnuplot directory nor a test sub-directory which aren't created for you, hence the error.

To solve this you need to change the prefix to e.g. {} (current directory):




    gnuplot def/.append style={prefix={}}, % Fixed the issue (prefix was 'gnuplot/\jobname/' before)



You need to run this using pdflatex -shell-escape so that gnuplot can be executed.

Note that you forget to add the backslash before POAmpAsymp and IntAmp. I also removed all unrelated code to make a real minimal example.

share|improve this answer
That definitely fixed it. They should mention that in the documentation somewhere. It's not there (even in French). Thanks for the real MWE. I'm still not too familiar with tikz or bodegraph, so there were only a few things I knew I could take out. – agoessling Oct 10 '11 at 19:39
@agoessling: See also egreg's comment in the chat. The manual seems to discuss that setting on page 5. – Martin Scharrer Oct 10 '11 at 20:09
I'll add your note in the documentation – rpapa Mar 13 '13 at 8:39

you have to create a gnuplot/\jobname/ directory before compiling, it's not necessary if you use windows

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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