\documentclass{tvary}
\usepackage{graphicx} % Required for inserting images
\usepackage{tikz}
\usepackage{pgfplots}


\begin{document}

\section{Obdélník}
\begin{tikzpicture}
    \draw (0,0) rectangle (6,4);
\end{tikzpicture}


\begin{tikzpicture}
    \draw (0,0) node[anchor=north east]{A}
    -- (6,0) node[anchor=north west]{B}
    -- (6,4) node[anchor=south west]{C}
    -- (0,4) node[anchor=south east]{D}
    -- cycle;
\end{tikzpicture}

\section{Úsečky}
\begin{tikzpicture}
    \coordinate (M) at (0,0);
    \coordinate (N) at (3,0);
    %\draw[line width=1pt] (M) -- (N);
    \draw[line width=1pt, |-|] (M) -- (N);
    \foreach \pos\label in {M,N}
      \draw(\pos) ++(0,-0.15) node[below]{\label};
    
\end{tikzpicture}

\section{n--úhelník}
\begin{tikzpicture}
    \draw[orange, ultra thick] (4,10) -- (6,10) 
        -- (6,12) -- (2,11) -- cycle;
\end{tikzpicture}

\rectangle{4 cm}{3 cm}{a}{b}

\trojuhelnik{5cm}{4cm}{3cm}

\mrizX[osy]{0.5}{-5,-5}{5,5}

\begin{center}
\begin{tikzpicture}%[scale=0.8]

\begin{axis}[axis lines=middle,grid=both,
            xtick distance=3,ytick distance=3,minor tick num=2,
            x=0.5cm,y=0.5cm,xmin=-20,xmax=20,ymin=-10,ymax=10]
\end{axis}

\end{tikzpicture}
\end{center}
\begin{tikzpicture}
     \draw (0,5) circle (1cm);
\end{tikzpicture}
\section{graf funkce}
\begin{tikzpicture}
  \begin{axis}%
    [grid=both,
     minor tick num=4,
     grid style={line width=.1pt, draw=gray!10},
     major grid style={line width=.2pt,draw=gray!50},
     axis lines=middle,
     enlargelimits={abs=0.2}
    ]
    \addplot[domain=-1:3,samples=50,smooth,red] {cos(deg(pi*x))};
  \end{axis}
\end{tikzpicture}
\end{document}
