When defining the pgfplots legend entries myself, I have a problem when using dashed lines in combination with marks. The mark is also dashed (or dotted, etc.), just as the accompanying line is. Is there a way of making sure that marks are drawn completely when using dashed/dotted/etc. lines?
MWE:
\documentclass{report}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
legend pos=south east,
legend entries={Entry 1,Entry 2,Entry 3}
]
\addlegendimage{blue,only marks,mark=oplus}
\addlegendimage{blue,dashed,no marks}
\addlegendimage{blue,dashed,mark=oplus}
\addplot+[black,no marks,domain=0:10]
{x^2};
\end{axis}
\end{tikzpicture}
\end{document}
Best Answer
Use this: