# How do you increase the number of points pgfplots uses?

My plots look blocky. Is it possible to increase the number of points PGFplots uses when plotting a graph from a formula?

-

## 1 Answer

The samples axis setting lets you do this:

\begin{tikzpicture}
\begin{axis}[samples=15,xmin=0,xmax=360,ymin=-1, ymax=1]
\addplot+[domain=0:360,mark=none] {sin( x )};
\end{axis}
\end{tikzpicture}


Looks blocky:

Upping samples to samples=65 looks quite a bit smoother for this zoom level:

-
+1. For simple functions like this, you can also add the smooth option, then you don't need as many samples. This can introduce unwanted artifacts with more complicated functions, though. –  Jake Feb 4 '13 at 17:54