默认情况下,右侧多个组图的各种图例条目的对齐方式(“图例位置 = 外东北”)。
不幸的是,没有键可以将图例放置在左侧(这有点不寻常,特别是因为有轴标签 - 但在“双面”文档中,我认为将一侧更改为奇数侧或偶数侧是有意义的)。
如何在左侧对齐多个组图的图例?
迷你工作示例:
\documentclass[varwidth]{standalone}
\usepackage{pgfplots,tikz}
\pgfplotsset{
compat=1.12
}
\usetikzlibrary{patterns}
\usetikzlibrary{pgfplots.groupplots}
\begin{document}
\begin{tikzpicture}
\begin{groupplot}[
group style={
group name=my plots,
group size=1 by 3,%10
},
legend cell align=left,
legend style={cells={align=left}},
legend style={draw=none},
legend pos = outer north east,
]
\nextgroupplot
\addplot {rnd};
\addlegendentry{tes};
\nextgroupplot
\addplot {rnd};
\addlegendentry{test 2012};
\nextgroupplot
\addplot {rnd};
\addlegendentry{test 20134214};
\end{groupplot}
\end{tikzpicture}
\begin{tikzpicture}
\begin{groupplot}[
group style={
group name=my plots,
group size=1 by 3
},
legend cell align=left,
legend style={cells={align=left}},
legend style={draw=none},
legend style={at={(-0.182,1.0)},anchor=north east},
]
\nextgroupplot
\addplot {rnd};
\addlegendentry{tes};
\nextgroupplot
\addplot {rnd};
\addlegendentry{test 2012};
\nextgroupplot
\addplot {rnd};
\addlegendentry{test 20134214};
\end{groupplot}
\end{tikzpicture}
\end{document}