I would like to change the discretization tikz uses in order to get a smoother graph.


 \pgfplotsset{compat = newest}  % loads newest improved settings



\begin{axis}[scale only axis, xlabel = x, xmin = 0, xmax = 4, ylabel = y,  ymax = 40, ymin = 0, ytick pos=left]

\addplot [black, domain=0:3.5] {25*x^0.2};


enter image description here

  • 2
    \addplot [black, domain=0:3.5, samples=100] {25*x^0.2}; – Dr. Manuel Kuehner Nov 6 '17 at 11:27
  • Problem solved? – Dr. Manuel Kuehner Nov 6 '17 at 14:13
  • or \addplot [black, domain=0:3.5, smooth] {25*x^0.2}; :-) – Zarko Nov 6 '17 at 14:35
  • @Dr.ManuelKuehner, thank you, works perfectly! I use samples=1000, with samples=100 I still get a little kink. @zarko, thank you! smooth doesn`t work for me, still a kink. – Sophie Nov 6 '17 at 14:53

Comment2Answer :)

\addplot [black, domain=0:3.5, samples=100] {25*x^0.2};

The samples option of the \addplot command defines the number of supporting points (German Stützstellen).

enter image description here

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.