I'm trying to read some coordinates from a file and then draw them using TikZ. The file is on this format:
timestamp 1.002132 3.2131231
timestamp 1.332132 2.9120
This is the code I have:
\begin{tikzpicture}
\draw[step=0.5,black,thin,xshift=0cm,yshift=0cm, opacity=0.3] (0,0) grid (8,4);
\draw [->](-.5,.5) -- (8.5,.5);
\draw [->] (4, -.5) -- (4, 4.5);
% read file and draw coordinates
\newread\file
\openin\file=recording2
\loop
\read\file to\fileline
\unless\ifeof\file
% Fetch coordinates in \coordX and \coordY
\StrSplit{\fileline}{14}{\ts}{\coords}
\def\coordX{\StrBefore{\coords}{ }}
\def\coordY{\StrBehind{\coords}{ }}
\draw (1,1) node {\coordX}; %this works fine
\draw (1,1) node {\coordY}; %this works fine
\draw (\coordX+4,\coordY+0.5) circle(1pt); %this cause the error
\repeat
\closein\file
\end{tikzpicture}
I have printed both the values of coordX and coordY and they are correct. Do you have any idea what is causing the error? Do I have to "cast" the values in order for TikZ to interpret the values as numeric values?
I have tried editing the memory settings for LaTeX with no luck, so I assume the error is in the code(duh-uh).