New to LaTeX, and was hoping someone would be kind enough to give me a hand with trying to draw lines of best fit to these data points. I have included the example I am working on.
\documentclass[]{article}
\usepackage{filecontents,pgfplots}
\usepackage{pgfplotstable}
% recommended:
\usepackage{booktabs}
\usepackage{array}
\usepackage{colortbl}
%\usepgfplotslibrary{clickable}
\pgfdeclareplotmark{halfcircle}{%
\begin{pgfscope}
\pgfsetfillcolor{white}%
\pgfpathcircle{\pgfpoint{0pt}{0pt}}
{\pgfplotmarksize}
\pgfusepathqfillstroke
\end{pgfscope}%
\pgfpathmoveto
{\pgfpoint{\pgfplotmarksize}{0pt}}
\pgfpatharc{0}{180}{\pgfplotmarksize}
\pgfpathclose
\pgfusepathqfill
}
\begin{filecontents}{conductivity.dat}
L(cm) 50mA 100mA 200mA 400mA 800mA 1000mA
0.0000 0.0000 0.0000 0.000 0.000 0.000 0.000
2.0000 0.0342 0.0635 0.128 0.260 0.520 0.650
3.0000 0.0555 0.1043 0.212 0.423 0.840 1.030
4.0000 0.1104 0.2064 0.396 0.809 1.300 1.700
6.0000 0.1350 0.2426 0.502 1.034 2.010 2.471
7.0000 0.1669 0.3326 0.673 1.339 2.610 3.140
\end{filecontents}
\begin{document}
\pgfplotstableread{conductivity.dat}{\conductivity}
\centering
\begin{tikzpicture}[scale=1]
\begin{axis}[xmin = 0, ymin = 0,
xlabel=Bed depth (cm),
ylabel = Voltage,
width=1.2\textwidth,
height=0.8\textwidth, legend pos={north west},
xticklabel style={/pgf/number format/1000 sep=}]
\addplot+[only marks][black, mark = otimes] table [x={L(cm)}, y={50mA}] {\conductivity};\addlegendentry{50mA}
\addplot+[only marks] [mark = star, black] table [x={L(cm)}, y={100mA}] {\conductivity};\addlegendentry{100mA}
\addplot+[only marks] [mark = o, black ] table [x={L(cm)}, y={200mA}] {\conductivity};\addlegendentry{200mA}
\addplot+[only marks] [mark = +, black] table [x={L(cm)}, y={400mA}] {\conductivity};\addlegendentry{400mA}
\addplot+[only marks] [mark = oplus, black] table [x={L(cm)}, y={800mA}] {\conductivity};\addlegendentry{800mA}
\addplot+[only marks] [mark=halfcircle, black] table [x={L(cm)}, y={1000mA}] {\conductivity};\addlegendentry{1000mA}
\end{axis}
\end{tikzpicture}
\end{document}