Adamski-iwp2017/05/wykresy.tex
2017-11-09 18:58:05 +01:00

103 lines
2.2 KiB
TeX

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usepackage{pgfplots}
\title{wykresy}
\author{Grzegorz Adamski}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
axis x line = center ,
axis y line = center ,
xtick ={ -5 , -4 ,-3,-2,-1,0,1,2,3,4 ,5} ,
ytick ={ -5 , -4 ,-3,-2,-1,0,1,2,3,4 ,5} ,
xlabel ={$x$},
ylabel ={$y$},
xlabel style ={ below right },
ylabel style ={ right },
xmin = -5.5 ,
xmax =5.5 ,
ymin = -5.5 ,
ymax =5.5 ,
title ={ $x^2-2x+3$ }
]
\addplot[domain = -3:5] plot(\x , \x*\x-2*\x+3);
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
\begin{axis}[
axis x line = center ,
axis y line = center ,
xtick ={ -5 , -4 ,-3,-2,-1,0,1,2,3,4 ,5} ,
ytick ={ -5 , -4 ,-3,-2,-1,0,1,2,3,4 ,5} ,
xlabel ={$x$},
ylabel ={$y$},
xlabel style ={ below right },
ylabel style ={ right },
xmin = -5.5 ,
xmax =5.5 ,
ymin = -5.5 ,
ymax =5.5 ,
title ={ $\cos(2x)$ }
]
\addplot[domain = -5:5,samples=500] plot{cos(deg(2*x))};
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
\begin{axis}[
axis x line = center ,
axis y line = center ,
xtick ={ -5 , -4 ,-3,-2,-1,0,1,2,3,4 ,5} ,
ytick ={ -5 , -4 ,-3,-2,-1,0,1,2,3,4 ,5} ,
xlabel ={$x$},
ylabel ={$y$},
xlabel style ={ below right },
ylabel style ={ right },
xmin = -5.5 ,
xmax =5.5 ,
ymin = -5.5 ,
ymax =5.5 ,
title ={ $\sin(\frac{1}{x})$ }
]
\addplot[domain = -5:5,samples=500] plot{sin(deg(1/x))};
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}[ scale =0.7]
\begin {axis}[title ={ $x^2+y^2$ }]
\addplot3[ surf , domain =-10:10 , samples =50]{ x*x+y*y )};
\end {axis}
\end {tikzpicture}
\begin{tikzpicture}[scale =0.7]
\begin{axis}[title ={ $x^2-y^2 + 2xy^2+1$ }]
\addplot 3[surf,domain =-10:10, samples =50]{x*x-y*y + 2*x*y*y+1};
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
\begin{axis}[
axis x line=center ,
axis y line=center ,
xtick ={-5,-4,...,8},
ytick ={-5,-4,...,8},
xlabel ={$x$},
ylabel ={$y$},
xlabel style ={below right},
ylabel style ={right},
xmin=-5,
xmax =5,
ymin=-2,
ymax =8,
title={$x^2-1$}
]
\addplot[line width=1pt] gnuplot [raw gnuplot]{plot 'wykresik.dat' using 1:2
};
\end{axis}
\end{tikzpicture}
\end{document}