Legend entry with curve fits

I am plotting two data sets with curve fits added manually (by defining two functions). How can I edit my legend entry to combine the data points and lines into one icon? So instead of having four legend entries, I only have two.

• It would be helpful if you composed a fully compilable MWE including \documentclass and the appropriate packages that sets up the problem. While solving problems can be fun, setting them up is not. Then, those trying to help can simply cut and paste your MWE and get started on solving the problem. – Peter Grill Jun 13 '13 at 12:35

an example would have been great. Without I have to guess how you want it. I have some sample code here, have a look if it is what you need.

\documentclass{scrartcl}

\usepackage{tikz}
\usepackage{pgf}
\usepackage{pgfplots}
\pgfplotsset{plot coordinates/math parser=false}
\usetikzlibrary{plotmarks}
\usepgfplotslibrary{external}
\tikzexternalize

\begin{document}

\tikzset{external/remake next}
\begin{tikzpicture}

\begin{axis}[%
width=6cm,
height=4cm,
scale only axis,
line join=round,
xmin=0,
xmax=12,
ymin=-0.25,
ymax=0.25,
legend style={draw=black,fill=white,legend cell align=left}
]

color=red,
mark=x,
only marks,
forget plot
]
table[row sep=crcr]{
0 0.22439196264301\\
1 0.203635954610048\\
2 0.145263853838474\\
3 0.0600692256042584\\
4 -0.0362016489987046\\
5 -0.125760125036079\\
6 -0.192062139836642\\
7 -0.222864398803253727\\
};

color=red,
solid,
line width=1pt,
forget plot
]
table[row sep=crcr]{
0 0.22439196264301\\
7 -0.222864398803253727\\
};

color=red,
mark=x,
solid,
line width=1pt]
table[row sep=crcr]{
-1 -1\\
};