Re: Pacchetto Tikz

#98985
GKT
Partecipante
    Up
    0
    Down
    ::


    `\documentclass[a4paper,11pt]{book}

    \usepackage[T1]{fontenc}
    \usepackage[utf8]{inputenc}
    \usepackage[italian]{babel}
    \usepackage{pgfplots}

    \pgfplotsset{compat=newest,%
    /pgf/number format/.cd,%
    use comma,
    fixed,
    precision=4}

    \begin{document}
    \centering
    \begin{tikzpicture}
    \begin{axis}[ylabel={$\Delta$P (\%)},%
    ymin=0,%
    ymax=0.008,%
    xtick=data,%
    ymajorgrids=true,%
    xtick pos=left,%
    xticklabel style={rotate=90,anchor=east},%
    xticklabel interval boundaries,%
    symbolic x coords={$Test\,1$,$Test\,2$,$Test\,3$,$Test\,4$,$0$},%
    scaled ticks={false}]
    \addplot[ybar interval,fill=cyan, draw=black, bar width=0.2cm]
    coordinates
    {($Test\,1$, 0.003) ($Test\,2$, 0.003)
    ($Test\,3$, 0.002) ($Test\,4$, 0.007) ($0$, 0)};
    \end{axis}
    \end{tikzpicture}
    \end{document}`Fai attenzione alle opzioni passate a pgfplots.

    Lorenzo

    Go to top