I'm writing a report and one of the requirement of my Bode-plots is that they are logarithmic, but I need integer numbers (i.e. 10, 20 and 30) on the y-axes.

I tried using ytick={} but these numbers do not appear in the graph.

Part of my code:

    xlabel=frequentie $f (\hertz)$,
    ylabel=weerstand $R (\ohm)$,
    minor grid style={gray!25}, 
    major grid style={gray!25},
\addplot table[x=f,y=R,col sep=semicolon]{MeetresultatenOpdracht12a.csv};


  • Welcome to TeX.SX! This should help you out: tex.stackexchange.com/a/139084/21344 Mar 1 '14 at 21:34
  • Welcome to the site! Your snippet helps, but it'd be great if you turn it into a complete MWE so that folks don't have to construct anything :) Have you tried yticklabels={10,15,20,25,30}?
    – cmhughes
    Mar 1 '14 at 21:35
  • Thanks for your quick responses! Oh, I'll mind that next time. I'm quite new to LaTeX and this forum so I still have a lot to learn :)
    – opieters
    Mar 1 '14 at 23:09

Here is a style example for Bode plots, though you have Ohm as the y-axis unit. In the label computation, \tick already holds the logarithmic value depending on the base we have set. Hence if you simply pretty print with the option fixed you get the desired value. Otherwise using an exponential function you can convert it to the original value.



  xlabel= Frequency,
  ylabel= R,
  x unit=\si{\hertz},
  y unit=\si{\ohm},
  log basis y=10,
  log basis x=10,
  %dB definition taken as 20 log10(x)
\addplot+[no marks,thick]{exp(-5*x)};

enter image description here


You can try the bodegraph package (http://www.ctan.org/pkg/bodegraph)

Some example here (http://sciences-indus-cpge.papanicola.info/Bode-Black-et-Nyquist-avec-Tikz) and here http://www.texample.net/tikz/examples/bode-plot/

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.