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}}


  • 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 Oct 10, 2011 at 16:43
  • Are you running pdflatex using -shell-escape? This is required to run shell commands. Oct 10, 2011 at 16:43
  • @MartinScharrer Thanks, I tried running pdflatex with the -shell-escape argument and I still receive the same error.
    – agoessling
    Oct 10, 2011 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. Oct 10, 2011 at 17:50
  • @MartinScharrer which directory? The directory of the test.tex or of the bodegraph package?
    – agoessling
    Oct 10, 2011 at 18:40

2 Answers 2


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.

  • 2
    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, 2011 at 19:39
  • 1
    @agoessling: See also egreg's comment in the chat. The manual seems to discuss that setting on page 5. Oct 10, 2011 at 20:09
  • 1
    I'll add your note in the documentation
    – rpapa
    Mar 13, 2013 at 8:39

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

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.