I do have a double axis plot which which compares two different things (part 1 on the left axis in solid, part two on the right axis in dashed) for different paramters which are common for both plots. Now, since in general the legend is crowed (more than 6 entries) I would like to join some legend entries. Meaning 2 lines (one from left and one from right) which have the same parameter should also be joined in the legend. Meaning, It would be nice to have two linestyles (solid and dashed) combined in one legend entry.
Here is my MWE for double axis plot:
\documentclass{standalone}
\usepackage{amsmath,tikz,pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
width=\linewidth,
xmin=-5,xmax=5,
ymin=0,ymax=25,
axis y line*=left,
axis x line*=bottom,
]
\addplot[solid] {x^2};
\addlegendentry{plot A};
\end{axis}
\begin{axis}[
width=\linewidth,
xmin=-5,xmax=5,
ymin=0,ymax=25,
axis y line*=right,
axis x line*=bottom
]
\addplot[dashed] {1.1*x^2};
\addlegendentry{plot A};
\end{axis}
\end{tikzpicture}
\end{document}

The perfect outcome would be a legend entry like this:
_______
------- plot A


