I have the following code, where the size of the cube marks is set to \x inside a foreach loop:
\begin{tikzpicture}
\begin{axis}[axis lines=none]
\newlength{\mylen}
\foreach \x in {1,2,...,10} {
\setlength{\mylen}{\x pt}
\addplot3[only marks,scatter,mark=cube*,mark size=\mylen] coordinates {(\x*5,10*\x,3*\x)};
};
\end{axis}
\end{tikzpicture}
This results in an empty plot - i.e. it doesn't work.
However, if we set the length for mylen (to a constant) before the foreach-loop, it works just fine. That might be a clue. Any ideas?
Also, how can can I manipulate the length inside the \setlength command to for instance \setlength{\mylen}{2*\x+10 pt} ?
…in it not...which is an unicode character. Are you doing anything special? (special package, Xelatex, ...). – Martin Scharrer♦ Mar 24 '11 at 1:24