I have code like this:
\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}
\draw [->,thick] (-5,0) -- (5,0) node[right] {$x$};
\draw [->,thick] (0,-5) -- (0,5) node[above] {$y$};
\draw[ultra thick, domain=-5:5] plot (\x, {pow(\x,2)-5});
\end{tikzpicture}
\end{document}
When I draw this, the parabola is extremely exceeding the area of what I want. Is there a way to limit the range of the function f(x)=x^2-5 to suit the coordinate area, i.e. only show the points which y-coordinates are between -5 and 5?


pgfplotsinstead ? – percusse Jan 29 '16 at 11:42TikZandpgf. I don't know in what circumstance had I better usepgfplots. IsTikZnot enough to use in some cases? – Eric Jan 29 '16 at 11:48