I have this code:

\begin{frame}
\pagestyle{empty}
\frametitle{Tvorba grafu}
\begin{tikzpicture}[scale=1.7]
(0,0) parabola (1.25,2.5) |- (0,0);
\draw[line width=0.25, ->] (0,0) -- (4,0) node[above]  {$x$};
\draw[line width=0.25, ->] (0,0) -- (0,4) node[right]  {$y$};
\draw[style=help lines] (0.001,0.001) grid (3.9,3.9);
\draw (0,0.25) parabola bend(0,0) (2,4) node[below right] {$x^2$};
\foreach \x/\xtext in {1/1, 2/2, 3/3}
\draw[shift={(\x,0)}] (0pt,2pt) -- (0pt,-2pt) node[below] {$\xtext$};
\foreach \y/\ytext in {1/1, 2/2,3/3}
\draw[shift={(0,\y)}] (2pt,0pt) -- (-2pt,0pt) node[left] {$\ytext$};
\draw (1.1cm,2pt) node[above] {$\displaystyle\int_0^{3} \!\!x^2\mathrm{d}x$};
\end{tikzpicture}
\end{frame}


Problem is in: shade[top color=blue,bottom color=gray] (0,0) parabola (1.25,2.5) |- (0,0); There is problem, Latex error.

But if i have this command:

\shade[top color=blue,bottom color=gray] (0,0) parabola (1.25,2.5) -| (0,0);


Its work, no error.

• Welcome to TeX.SX! What is your question? – TeXnician Apr 22 '17 at 17:36
• Welcome. Please provide a full compatible minimal working example(MWE): tex.meta.stackexchange.com/questions/228/… . Started with \documentclass and ended with \end{document}. – Bobyandbob Apr 22 '17 at 17:37
• Maybe this example will help you texample.net/tikz/examples/parabola-plot. If not: What is your question? – Bobyandbob Apr 22 '17 at 17:53
• Instead of \pagestyle{empty}, use \begin{frame}[plain] – user36296 Apr 22 '17 at 18:33
• Please STOP CLOSING this posting. The OP hasn't been back since posting, so s/he couldn't possibly clarify anything. – gernot says Reinstate Monica Apr 22 '17 at 21:21

Both shading commands works as expected. With

\shade[top color=blue,bottom color=gray]
(0,0) parabola (1.5,2.25) |- (0,0);% shaded below of parabola


you obtain

and with

\shade[top color=blue,bottom color=gray]
(0,0) parabola (1.5,2.25) -| (0,0);% shaded left of parabola


For my test I slightly rewrote your MWE (example from TikZ & PGF manual, pp. 874):

\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{backgrounds}
\usepackage{mathtools}

\begin{document}
\begin{frame}[plain]
\frametitle{Tvorba grafu}
\begin{tikzpicture}[scale=1.5]
% grid
\draw[help lines] (0,0) grid (3.9,3.9);
% axis
\draw[->] (0,0) -- (4,0) node[above]  {$x$};
\draw[->] (0,0) -- (0,4) node[right]  {$y$};
\foreach \i in {1, 2, 3}
{
\draw (2pt,\i) -- + (-4pt,0) node[left]  {$\i$};
\draw (\i,2pt) -- + (0,-4pt) node[below] {$\i$};
}
% parabola
\draw (0,0) parabola bend (0,0) (2,4) node[below right] {$x^2$};
\draw (1.05,0) node[above] {$\displaystyle\int_0^{3}\kern-1.75ex x^2\,\mathrm{d}x$};
\scoped[on background layer]

Orthogonal coordinate |- mean first vertically then horizontally, and -| opposite. Is this your question?