Re: Consigli per rendere meglio un grafico multiplo

#79169
Up
0
Down
::


Molto carino questo effetto, peccato proprio non usare Beamer. (:evil: però almeno con PowerPoint ho fatto in fretta)

Purtroppo mettendo l’ambiente [tt]groupplots[/tt] si ottiene un guaio:

`
\documentclass[10pt,a4paper]{scrbook}

\usepackage{etex}

\usepackage[eulermath]{classicthesis}
\usepackage{arsclassica}

\usepackage{pgfplots}
\pgfplotsset{/pgf/number format/use comma, compat=newest}
\usepgfplotslibrary{groupplots}
\usetikzlibrary{calc}

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

\begin{document}

\begin{figure}[htbp]%morfometria intera logyaxis
\centering
%\tikzsetnextfilename{log}
\begin{tikzpicture}
\begin{groupplot}[small,
group style={group size=3 by 1, ylabels at=edge left},
%xmin=0, ymin=0, height=6cm, width=5cm,
%group/horizontal sep=0pt,
%group/vertical sep=0pt,
%font=\sffamily,
enlarge x limits=0.30,
legend style={at={(-1,-0.42)}, anchor=north,legend columns=1, font=\large, cells={anchor=west}},
%bar width=24,
width=0.5\textwidth,
ybar,
ymin=0, ymax=1100,
ymajorgrids=true,
ylabel={Area (\si[detect-family]{\square\micro\meter})},
xtick pos=left,
xtick={1,2,3}, xticklabels={SOMA, NUCLEO, NUCLEOLO},
nodes near coords,
]
\nextgroupplot
\addplot+[error bars/.cd, y dir=both, y explicit,]%ctrl
coordinates{
(1, 1008.11) +- (9.01, 9.01)
(2, 141.55) +- (11.1, 11.1)
(3, 8.02) +- (1.05, 1.05)
};
\draw ($(axis cs:1,910) + (+0.5pt,0)$) node [anchor=south] {\S};
\nextgroupplot
\addplot+[error bars/.cd, y dir=both, y explicit]%btz 8w
coordinates{
(1, 864.03) +- (48.48, 48.48)
(2, 125.63) +- (7.26, 7.26)
(3, 7.17) +- (0.26, 0.26)
};
\draw ($(axis cs:2,135) + (+0.5pt,0)$) node [anchor=south] {\S};
\nextgroupplot
\addplot+[error bars/.cd, y dir=both, y explicit]%btz fu
coordinates{
(1, 964.42) +- (20.71, 20.71)
(2, 137.8) +- (4.26, 4.26)
(3, 7.5) +- (0.36, 0.36)
};
\draw ($(axis cs:3,7.5) + (+0.1pt,0)$) node [anchor=south] {\dag};
\draw ($(axis cs:3,8) + (+25pt,0)$) node [anchor=south] {\P};

\legend{CTRL, BTZ 8w, BTZ-FU}

\end{groupplot}
\end{tikzpicture}
\end{figure}

\end{document}
`

In pratica, invece di fare un grafico SOMA, un grafico NUCLEO e un grafico NUCLEOLO, ne crea 3 usando in sequenza le coordinate (completamente sbagliato perchè invece dovrebbe riunire tutte le coordinate [tt]1, XXX[/tt] per il grafico che ha [tt]xtick=1[/tt] e [tt]xticklabel=SOMA[/tt], e così via) e riferisce tutte le barre ai controlli.
Ma con l’ambiente standard [tt]axis[/tt] non succede così 😕

Go to top