Re: Consigli per rendere meglio un grafico multiplo

#79173
Liverpool
Partecipante
    Up
    0
    Down
    ::


    `\documentclass[varwidth]{standalone}
    \usepackage[output-decimal-marker={,},per-mode=symbol,abbreviations=false,separate-uncertainty]{siunitx}

    \usepackage{pgfplots}
    \pgfplotsset{compat=newest, every axis/.append style={font=\sffamily\scriptsize},
    yticklabel={$\mathsf{\pgfmathprintnumber{\tick}}$},
    /pgf/number format/.cd, use comma, 1000 sep={\,}, min exponent for 1000 sep=4}
    \usepgfplotslibrary{groupplots}
    \usetikzlibrary{calc}

    \newlength{\wid}
    \setlength{\wid}{15cm}
    \def\bw{18pt}

    \begin{document}
    \centering
    \begin{tikzpicture}
    \begin{groupplot}
    [group style={group size=3 by 1, horizontal sep=1.7em, ylabels at=edge left},
    width=\wid, height=0.6\wid,
    legend columns=-1, legend entries={CTRL, BTZ 8w, BTZ–FU},
    legend style={fill=none, font=\sffamily\small}, legend to name=legenda,
    ylabel={Area (\si[detect-family]{\square\micro\meter})},
    tickwidth=0pt, xtick={1}, xtick pos=left, ymajorgrids=true,
    ]
    \nextgroupplot [ymin=0, ymax=1199, width=0.3\wid,
    ybar, bar width=\bw, xticklabel={SOMA}]
    \foreach \y/\e in {1008.11/9.01, 864.03/48.48, 964.42/20.71}
    \addplot+ [error bars/.cd, y dir=both, y explicit] coordinates {(1,\y) +- (\e,\e)};
    \draw (axis cs:1,912.51) node [anchor=south] {\S};

    \nextgroupplot [ymin=0, ymax=199, width=0.3\wid,
    ybar, bar width=\bw, xticklabel={NUCLEO}]
    \foreach \y/\e in {141.55/11.1, 125.63/7.26, 137.8/4.26}
    \addplot+ [error bars/.cd, y dir=both, y explicit] coordinates {(1,\y) +- (\e,\e)};
    \draw (axis cs:1,132.89) node [anchor=south] {\S};

    \nextgroupplot [ymin=0, ymax=9.95, width=0.3\wid,
    ybar, bar width=\bw, xticklabel={NUCLEOLO}]
    \foreach \y/\e in {8.02/1.05, 7.17/0.26, 7.5/0.36}
    \addplot+ [error bars/.cd, y dir=both, y explicit] coordinates {(1,\y) +- (\e,\e)};
    \draw (axis cs:1,7.43) node [anchor=south] {\dag};
    \draw ($(axis cs:1,7.86) + (\bw,0) + (+2pt,0)$) node [anchor=south] {\P};
    \end{groupplot}
    \end{tikzpicture}

    \ref{legenda}
    \end{document}`Per favore, verifica i valori delle barre e la posizione delle annotazioni. Le proporzioni sono per uno schermo in formato 4:3 ([tt]height=0.6\wid[/tt]). Il valore dell’altezza tiene conto del fatto che la legenda non fa parte del grafico.

    P.S.: mi ricordo, ma pensavo che SOMA ecc… sarebbero diventati i titoli e che le etichette delle tacche sarebbero state CTRL ecc…, perciò non sarebbe più servita la legenda.

    [attachment=473]Mat.png[/attachment]

    Attachments:
    You must be logged in to view attached files.

    Go to top