# tikz error with datavisualization when babel is used

I don't know if it is a bug or if I am doing something wrong.

The following example works fine, but if I uncomment the babel usepackage line, it fails with the error given below.

\documentclass[french]{article}

%\usepackage{babel}

\usepackage{tikz}
\usetikzlibrary{datavisualization.formats.functions}

\begin{document}

\begin{tikzpicture}
\datavisualization[school book axes, visualize as smooth line]
data[format=function] {
var x : interval [-1.5:1.5];
func y = \value x * \value x;
};
\end{tikzpicture}

\end{document}


The following error pops with babel:

! Package tikz Error: Semicolon expected.
(...)
l.15         };


Note that the example compiles fine with the english language. The example is taken from the PGF manual.

Can someone tell what is going on and either fix my code or provide a workaround?

• Add babel to the list of TikZ libraries you are loading so short-hands are switched off in picture environments. The active characters cause havoc. – cfr May 22 '17 at 13:35
• Just found it in the tikz documentation, searching for "babel" known bugs, I didn't expect to find a whole Tikz package about the issue :D Thank you very much! Feel free to post it as an answer, I'll accept it. – Fabian Pijcke May 22 '17 at 13:38

Add babel to the list of TikZ libraries you are loading so short-hands are switched off in picture environments. The active characters cause havoc.