I am trying to design a legend like picture. it has two column and each column has head text. Also, how I can control which item in first column and which one in second column?
\documentclass{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.6}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
legend columns=2,
legend style={
% the /tikz/ prefix is necessary here...
% otherwise, it might end-up with `/pgfplots/column 2`
% which is not what we want. compare pgfmanual.pdf
/tikz/column 2/.style={
column sep=5pt,
},
},
]
\addplot {x};
\addlegendentry{ }
\addplot {x+4};
\addlegendentry{$x$+4}
\addplot {2*x};
\addlegendentry{ }
\addplot {2*x+4};
\addlegendentry{$2x$+4}
\addplot {4*x};
\addlegendentry{ }
\addplot {4*x+4};
\addlegendentry{$4x$+4}
\end{axis}
\end{tikzpicture}
\end{document}




