I am a beginner with TikZ and have two problems by plotting a function.

first: The function is quite big, I need 8000 points in x direction and 50 in y. Every time I try to get some similar big aces they are too big. I tried to scale them but it did not work.

second: The function is: f(x)=10ln(1+1/(4pi^24pi0,025^2/4pi*(340/x)) I tried to plot this function up to 8 points in x direction but I only get an error.

Can some one help me or send me a similar question where I can find a solution?


  • Welcome to TeX.SE! (i) do you really need to draw all 8000 points? So many if points cant be placed in typical diagram without overlapping them. Try to filter them and draw only each 100th point. (ii) it is not clear what is the problem. Clarify it with small, compilable document, which reproduce your problem.
    – Zarko
    Commented Mar 11, 2021 at 23:00

2 Answers 2


pgfplots scales the plot to some desired width and height. If you plot a large number of samples, it can make sense to simplify the expression by cancelling common factors in fractions etc.

 \addplot[domain=1:8000, smooth, samples=501]

enter image description here


If I understand you correctly, the problem is that when drawing functions with TikZ, the default unit of length is 1cm, and you want to keep the 1:1 correspondence between TikZ coordinates and (x, y) values for your function?

If so, it may be enough to change TikZ's unit vectors; see section 25.2 of the TikZ documentation:

\draw[domain=1:8000, smooth, samples=250] plot (\x,{10*ln(1+1/(4*pi^2*4*pi*0.025^2/4*pi*(340/\x)))});

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .