Re: Le mie (dis)avventure con TikZ

#96746
lorenzo.pantieri
Partecipante
    Up
    0
    Down
    ::


    Un secondo problema.
    `\documentclass{article}
    \usepackage{tikz}
    \begin{document}
    Costruiamo la tabella dei segni della derivata.
    %
    \begin{center}
    \begin{tikzpicture}[font=\small,x=10mm, y=10mm]

    \draw [->] (0,0) — (8,0) node [below right] () {$r$};

    \foreach \x in {2,4,6}{
    \draw (\x,3pt)–(\x,-3pt);

    \begin{scope} [dotted]
    \draw (\x,0) — (\x,-3.5);
    \end{scope}}

    \node at (-0.25,-0.5) {$N$};
    \node at (-0.25,-1.0) {$D$};
    \node at (-0.25,-2.0) {$f'$};
    \node at (-0.25,-3.0) {$f$};

    \node [above] at (2,0) {$-1$};
    \node [above] at (4,0) {$0$};
    \node [above] at (6,0) {$1$};

    \node at (1,-0.5) {$-$};
    \node at (3,-0.5) {$-$};
    \node at (5,-0.5) {$+$};
    \node at (7,-0.5) {$+$};

    \node at (1,-1.0) {$+$};
    \node at (3,-1.0) {$+$};
    \node at (5,-1.0) {$+$};
    \node at (7,-1.0) {$+$};

    \node at (1,-2.0) {$-$};
    \node at (3,-2.0) {$-$};
    \node at (5,-2.0) {$+$};
    \node at (7,-2.0) {$+$};

    \draw [fill=black] (4,-0.5) circle (2.0pt);

    \draw [fill=black] (2,-1.0) circle (2.0pt);
    \draw [fill=black] (6,-1.0) circle (2.0pt);

    \draw [fill=white] (2,-2.0) circle (2.0pt);
    \draw [fill=black] (4,-2.0) circle (2.0pt);
    \draw [fill=white] (6,-2.0) circle (2.0pt);

    \draw [very thick,->] (0.5,-2.5) — (1.5,-3.5);
    \draw [very thick,->] (2.5,-2.5) — (3.5,-3.5);
    \draw [very thick,->] (4.5,-3.5) — (5.5,-2.5);
    \draw [very thick,->] (6.5,-3.5) — (7.5,-2.5);

    \node [above] at (4,-2.5) {$\min$};
    \end{tikzpicture}
    \end{center}

    Costruiamo la tabella dei segni della derivata seconda.
    %
    \begin{center}
    \begin{tikzpicture}[font=\small,x=10mm, y=10mm]

    \draw [->] (0,0) — (6,0) node [below right] () {$r$};

    \foreach \x in {2,4}{
    \draw (\x,3pt)–(\x,-3pt);

    \begin{scope} [dotted]
    \draw (\x,0) — (\x,-3.0);
    \end{scope}}

    \node at (-0.25,-0.5) {$N$};
    \node at (-0.25,-1.0) {$D$};
    \node at (-0.25,-2.0) {$f''$};
    \node at (-0.25,-3.0) {$f$};

    \node [above] at (2,0) {$-1$};
    \node [above] at (4,0) {$1$};

    \node at (1,-0.5) {$-$};
    \node at (3,-0.5) {$-$};
    \node at (5,-0.5) {$-$};

    \node at (1,-1.0) {$+$};
    \node at (3,-1.0) {$-$};
    \node at (5,-1.0) {$+$};

    \node at (1,-2.0) {$+$};
    \node at (3,-2.0) {$-$};
    \node at (5,-2.0) {$+$};

    \draw [fill] (2,-1.0) circle (2.0pt);
    \draw [fill] (4,-1.0) circle (2.0pt);

    \draw [fill=white] (2,-2.0) circle (2.0pt);
    \draw [fill=white] (4,-2.0) circle (2.0pt);

    \draw [very thick] (0.5,-3.0) parabola bend (1,-2.5) (1.5,-3.0);
    \draw [very thick] (2.5,-2.5) parabola bend (3,-3.0) (3.5,-2.5);
    \draw [very thick] (4.5,-3.0) parabola bend (5,-2.5) (5.5,-3.0);
    \end{tikzpicture}
    \end{center}

    \end{document}`
    Le due tabelle sono costruite artigianalmente, ma con un po’ di pazienza si riescono a comporre e ad adattare a tutti i casi che mi interessano. Il problema che ho è questo: le frecce nella prima tabella mi piacciono, ma le parabole nella seconda sono tropo basse e sacrificate. Riuscite a dirmi come modificare il codice delle parabole della seconda tabella, per averle alte e larghe quanto le frecce della prima?

    Il codice, poi, deve essere modificabile, quindi i numeri devono essere semplici.

    Ah, se volete il contesto in cui quelle tabelle verranno utilizzate:

    http://www.lorenzopantieri.net/Matematica_files/Quinta.pdf

    Ancora grazie!

    Go to top