8

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}

enter image description here

2

1 Answer 1

5

Use this:

\addlegendimage{blue,dashed,mark=oplus,mark options=solid}
1
  • sorry for the late answer - have been in holidays.
    – oerpli
    Sep 9, 2013 at 18:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .