Re: Le mie (dis)avventure con TikZ

#96730
lorenzo.pantieri
Partecipante
    Up
    0
    Down
    ::


    `\begin{tikzpicture}[font=\small]
    \begin{axis} [width=\textwidth,
    axis lines=middle,
    xmin=-5,xmax=5,ymin=-15,ymax=15,
    enlargelimits,
    xtick={-5,…,5},
    ytick={-4},
    xlabel=$x$,
    ylabel=$y$]
    \addplot [domain=-6:6, samples=600,unbounded coords=jump,smooth,very thick,blue] {(4-x*x)/(x-1)};

    \pattern [pattern= north east lines, pattern color=blue!75!white] (axis cs:1,-18) rectangle (axis cs:2,0);
    \pattern [pattern= north east lines, pattern color=blue!75!white] (axis cs:2,0) rectangle (axis cs:18,18);
    \pattern [pattern= north east lines, pattern color=blue!75!white] (axis cs:-2,0) rectangle (axis cs:1,18);
    \pattern [pattern= north east lines, pattern color=blue!75!white] (axis cs:-2,0) rectangle (axis cs:-18,-18);

    \draw [blue,thick,dashed] (axis cs:1,-20) — (axis cs:1,20);
    \draw [blue,thick,dashed] (axis cs:2,-20) — (axis cs:2,20);
    \draw [blue,thick,dashed] (axis cs:-2,-20) — (axis cs:-2,20);

    \draw (axis cs:1,0) [blue,fill=white,very thick] circle (2.0pt);
    \draw (axis cs:2,0) [blue,fill=blue,very thick] circle (2.0pt);
    \draw (axis cs:-2,0) [blue,fill=blue,very thick] circle (2.0pt);
    \draw (axis cs:0,-4) [blue,fill=blue,very thick] circle (2.0pt);
    \end{axis}
    \end{tikzpicture}
    `
    Perché l’opzione “unbounded coords=jump” non funziona?

    In generale, faccio errori nel codice precedente?

    Go to top