pgfplots: aggiungere l’error bar

  • Creatore
    Topic
  • #104448
    Up
    0
    Down
    ::


    Ciao, non riesco ad inserire l’error bar ai quadratini blu che rappresentano dati sperimentali (ad esempio: ogni valore ha un’incertezza di più o meno 1). Vorrei ottenere una cosa come quella della prima figura. La seconda figura è quello che ho per il momento.

    `
    \documentclass {article}
    \usepackage[T1]{fontenc}
    \usepackage[utf8]{inputenc}
    \usepackage[english,italian]{babel}
    \usepackage{pgfplots}

    \begin{document}
    \begin{center}
    \begin{tikzpicture}
    \begin{axis} [grid=major,width=8cm,ymin=10,ymax=40,ytick={10,15,…,40},
    legend pos=outer north east,
    xlabel={N\ped{fila fori}}, ylabel={Nu\ped{medio}}]

    \addplot [green, thick, mark=*]
    coordinates {(1,27) (2,26) (3,25)
    (4,22.5) (5,22) (6,21) (7,20)};

    \addplot [blue, thick, only marks, mark=square*]
    coordinates {(2,22) (3,23) (4,23)
    (5,21) (6,20.5)};

    \legend {Corr,Exp}
    \end{axis}
    \end{tikzpicture}
    \end{center}
    \end{document}
    `

    [attachment=1483]Screenshotfrom2015-12-20220046.png[/attachment]

    [attachment=1484]Screenshotfrom2015-12-20220117.png[/attachment]

    Attachments:
    You must be logged in to view attached files.
  • Devi essere connesso per rispondere a questo topic.

Go to top