Re: Le mie (dis)avventure con TikZ

#96751
lorenzo.pantieri
Partecipante
    Up
    0
    Down
    ::


    Ciao a tutti. Vorrei sapere perché nel codice seguente l’opzione “grid” non funziona… 🙁
    `
    \documentclass{article}
    \usepackage{tikz,pgfplots}
    \begin{document}
    \begin{tikzpicture}[font=\small]
    \begin{axis} [width=0.55\textwidth,scale mode=scale uniformly,
    axis lines=middle,
    xmin=-5,xmax=4,ymin=-5,ymax=5,
    enlargelimits,
    xtick=\empty,
    ytick=\empty,
    xlabel=$x$,
    ylabel=$y$,grid]

    \draw (axis cs:-2,-4) — (axis cs:1,-4);
    \draw (axis cs:1,-4) — (axis cs:2,3);
    \draw (axis cs:-4,4) — (axis cs:-2,-4);

    \addplot [domain=-5:-4, samples=200, restrict y to domain=-10:10,smooth,dashed] {-4*x-12};

    \draw (axis cs:2,3) [blue,fill=blue,very thick] circle (2.0pt);
    \end{axis}
    \end{tikzpicture}
    \end{document}
    `
    Grazie mille,
    Lorenzo

    Go to top