Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

share|improve this question
1  
use this: \addlegendimage{blue,dashed,mark=oplus,mark options=solid} –  oerpli Aug 2 '13 at 9:30
    
Related tex.stackexchange.com/questions/84287/… –  percusse Aug 2 '13 at 9:38
    
Thanks oerpli, that works like a charm! –  graafderk Aug 2 '13 at 9:50

1 Answer 1

Use this:

\addlegendimage{blue,dashed,mark=oplus,mark options=solid}
share|improve this answer
    
sorry for the late answer - have been in holidays. –  oerpli Sep 9 '13 at 18:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.