As stated in the comments to @Habi's answer, pgfplots
cannot perform a non-linear regression of your data. That's why you have to rely on an external tool (I used a quick fit
routine in gnuplot
).
Once you obtained the fitted parameter(s), you can use pgfplots
to draw a plot of the fitted curve/function, like so:
\documentclass{standalone}
\usepackage{pgfplots}
\usepackage{siunitx}
\DeclareSIUnit\Molar{\textsc{m}} % http://tex.stackexchange.com/a/27618/828
\pgfplotsset{compat=1.6}
\begin{document}
\begin{tikzpicture}
\begin{semilogxaxis}[%
xlabel={S / \si{\milli\Molar}},%
ylabel={\% Activity},%
legend pos=south west,%
legend style={cells={anchor=west}}%
]
\addplot [blue,mark=*,only marks] coordinates {
( 0.00080, 99)
( 0.00800, 91)
( 0.08000, 89)
( 0.40000, 89)
( 0.80000, 79)
( 1.60000, 61)
( 4.00000, 39)
( 8.00000, 25)
(80.00000, 4)
};
\addlegendentry{data};
% add plot of fitted curve with IC50=2.62645 mM (obtained via gnuplot)
% %Activity = max * S / (IC50 + S) + min
\addplot[red,smooth,domain=1e-3:100] { 100 * 2.63645 / (2.63645 + x) };
\addlegendentry{sigmoidal fit}
\end{semilogxaxis}
\end{tikzpicture}
\end{document}
