Re: Il disegno programmato nell’Arte di scrivere con LaTeX

#72629
lorenzo.pantieri
Partecipante
    Up
    0
    Down
    ::


    Gli esempi che ho scelto, per ora, sono questi:
    `\documentclass{article}
    \usepackage{pgfplots}

    \begin{document}

    \begin{tikzpicture}
    \begin{axis}
    \addplot+[domain=-pi:pi] {sin(deg(x))};
    \end{axis}
    \end{tikzpicture}

    \begin{tikzpicture}
    \begin{axis}
    \addplot3 [surf, samples=50, domain=-2*pi:2*pi, colormap/cool]
    {sin(deg(sqrt(x^2+y^2)))/sqrt(x^2+y^2)};
    \end{axis}
    \end{tikzpicture}

    \begin{tikzpicture}
    \begin{axis}[
    ybar interval,
    xticklabel= \pgfmathprintnumber\tick–\pgfmathprintnumber\nexttick
    ]
    \addplot+[hist={bins=3}]
    table[row sep=\\,y index=0] {
    data\\
    1\\ 2\\ 1\\ 5\\ 4\\ 10\\
    7\\ 10\\ 9\\ 8\\ 9\\ 9\\
    };
    \end{axis}
    \end{tikzpicture}

    \end{document}`
    Mi pare che coniughino la semplicità con la capacità di illustrare le potenzialità degli strumenti.

    Ciao,
    L.

    Go to top