I can confirm the problem for pgf in texlive 2007-13, using Ubuntu 8.04 hardy. I examined tikz.code.tex, where \tikz@plot@samples@recalc is defined:
\def\tikz@plot@samples@recalc#1:#2\relax{% \pgfmathparse{#1}% \let\tikz@temp@start=\pgfmathresult% \pgfmathparse{#2}% \let\tikz@temp@end=\pgfmathresult% \pgfmathparse{\tikz@temp@start+(\tikz@temp@end-\tikz@temp@start)/\tikz@plot@samples}% \edef\tikz@plot@samplesat{\tikz@temp@start,\pgfmathresult,...,\tikz@temp@end}% }
The colon used in this definition is used by babel as shorthand, see frenchb.ldf. You could disable this shorthand temporarily. I modified the example above to get it compilable:
\documentclass[10pt]{article} \usepackage[frenchb]{babel} \usepackage{tikz} \begin{document} \shorthandoff{:} \begin{tikzpicture} \draw plot[domain=-2:2] function{x}; \end{tikzpicture} \shorthandon{:} \end{document}
I can confirm the problem for pgf in texlive 2007-13, using Ubuntu 8.04 hardy. samples@ recalc is defined:
I examined tikz.code.tex, where \tikz@plot@
\def\tikz@ plot@samples@ recalc# 1:#2\relax{ % {#1}% tikz@temp@ start=\ pgfmathresult% {#2}% tikz@temp@ end=\pgfmathres ult% {\tikz@ temp@start+ (\tikz@ temp@end- \tikz@temp@ start)/ \tikz@plot@ samples} % tikz@plot@ samplesat{ \tikz@temp@ start,\ pgfmathresult, ...,\tikz@ temp@end} %
\pgfmathparse
\let\
\pgfmathparse
\let\
\pgfmathparse
\edef\
}
The colon used in this definition is used by babel as shorthand, see frenchb.ldf. You could disable this shorthand temporarily. I modified the example above to get it compilable:
\documentclass[ 10pt]{article} frenchb] {babel}
\usepackage[
\usepackage{tikz}
\begin{document}
\shorthandoff{:}
\begin{tikzpicture}
\draw plot[domain=-2:2] function{x};
\end{tikzpicture}
\shorthandon{:}
\end{document}