I've got some problems with plotting a function in a diagram with logarithmic axis: I doesnt give me any errors, but I don't see a graph. Do I need to include any other package?

[xlabel={Temperatur [Grad]},ylabel={Zeit [h]},
tick align=outside,
\addplot {10^(-4.59)*x^10.627};

[only marks,color=blue,mark=*]
[only marks,color=blue,mark=x]


The next thing is, that I want the x-axis to have a logarithmic grid (for examples in steps of 10) but just one label at 10^2. I tried a lot, but nothing really worked out ...

Maybe you could help me?

  • Welcome to TeX.SX! You can have a look on our starter guide to familiarize yourself further with our format.
    – jub0bs
    May 27 '13 at 12:27
  • 1
    Welcome to TeX.SX! Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. May 27 '13 at 12:29
  • 2
    The plot does not show up because its domain (that is, the range over which it is evaluated) is outside the visible axis range. If you set domain=10:100 and remove the ymax setting, you can see your graph. However, I think something's wrong with your equation: Over this x range, the graph's y values range from 1e6 to 1e16, so well outside the range of your data.
    – Jake
    May 27 '13 at 12:44
  • 1
    Since you have some responses below that seem to answer your question, please consider marking one of them as ‘Accepted’ by clicking on the tickmark below their vote count (see How do you accept an answer?). This shows which answer helped you most, and it assigns reputation points to the author of the answer (and to you!). It's part of this site's idea to identify good questions and answers through upvotes and acceptance of answers.
    – jub0bs
    May 28 '13 at 10:47

Remove xmin/xmax, ymin/ymax options and you'll get it. enter image description here

Use domain instead if you want to restrict the plots.


A bit of detective work shows that your function 10^(-4.59)*x^10.627 takes no values in your ordinate range, for x in [10,100]: it's an increasing function and its values at x=10 and x=100 are about 10^6 and 4.6*10^{16}, respectively, which both lie outside [10,1000].

Therefore, you must change the values passed to xmin, xmas, ymin, ymax in order to "see" that plot.

Regarding your second question, you can set the tick labels manually, using xticklabels={<comma separated list>} and yticklabels={<comma separated list>}.

Edit: Jake's comment already says it all; I only saw it after posting this answer.

  • Thanks alot, first thing: stupid problem, i accidently switched the exponents. After that, the plot is visible.
    – Flo
    May 27 '13 at 19:18

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.