I would like to draw several plots with lines and only a few marks.
The markes are irregularely spaced, so I used a method alluded to in
the pgfplots manual, section 4.8.5 (Legend appearance), page 159,
every legend image post entry.
The lines and the marks are created by different \addplot commands.
The issue with this method is to have a legend showing both the lines
and marks.
Here is an adaptation of the code provided in the pgfplots manual:
\documentclass{article}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[legend image post style={mark=*}]
\addplot+[only marks,forget plot]coordinates {(0.5,-0.5) (1,-1) (1.5,-1.5)};
\addplot+[mark=none,smooth,domain=0:2]{-x};
\addlegendentry{Parabola}
\addplot+[only marks,forget plot]coordinates {(0.3,0.3) (0.45,0.45) (1.7,1.7)};
\addplot+[mark=none,smooth,domain=0:2]{x};
\addlegendentry{Parabola}
\end{axis}
\end{tikzpicture}
\end{document}
This code works when there is only one curve because one can specify
the plot mark in the legend image post style key.
However, do you know how this could be adapted to several plots with
different plotmarks ?

