Re: Disegno di funzione con Tikz

#91993
Up
0
Down
::


`\documentclass[a4paper,10pt,openany,fleqn]{book}
\usepackage[italian]{babel}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{amssymb,amsmath,amsfonts,amsthm,graphicx,makeidx,fancyhdr,pxfonts,txfonts,nccmath,tikz,pgf,pgfplots,enumitem}
\usepackage[miktex,cleanup]{gnuplottex}
\pgfplotsset{compat=1.9,tick label style={font=\footnotesize},label style={font=\scriptsize}}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
anchor=origin,
disabledatascaling,
x=1cm,y=1cm,
axis lines=middle,
enlargelimits,
xtick={-1},
ymax=2,ymin=-2,
no markers,line width=0.2pt,
cycle list={{black,solid}},
clip=false,
width=5cm, height=5cm,]
\addplot gnuplot [domain=-1:1,samples=120,smooth,thick] {(x^2-4)/(x+1)};
\end{axis}
\draw[dotted,very thin] (0,1.57) — (1,1.57) — (1,0);\draw[dotted,very thin] (-1,0) — (-1,-1.57) — (0,-1.57);
\draw (0,1.85) node[anchor=south,font=\scriptsize] {$y$};\draw (1.2,0) node[anchor=west,font=\scriptsize] {$x$};
\end{tikzpicture}
\end{document}`

Go to top