I have a plot with a linear line that links up several markers. The legend entry thus display the marker with a line through it.
Is there a way for the legend entry to display the marker only, without the line through it? i.e., as if it is a legend entry for no line plotting?
Thanks guys.
\begin{tikzpicture}
\begin{axis}[
legend pos=outer north east,
legend cell align={left},
legend entries={abc, def},
scatter/classes={
abc={mark=*,blue},
def={mark=diamond*,red},% <-- don’t add comma
},
]
\addplot [scatter, blue,
point meta=explicit symbolic,
]table [meta=algorithm] {
x y algorithm
50 327 abc
100 659 abc
};
\addplot [scatter, red,
point meta=explicit symbolic,
]table [meta=algorithm] {
x y algorithm
50 172 def
100 308 def
};
\end{axis}
\end{tikzpicture}