在 Tikz 中,如何循环遍历一个readarray
对象?
\documentclass[tikz, border=0mm]{standalone}
\usetikzlibrary{calc}
\usepackage{array}
\usepackage{readarray}
\readarraysepchar{,}
\usepackage{tikz,csvsimple}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.csv}
1,2,3
4,5,6
7,8,9
10,11,12
13,14,15
\end{filecontents*}
\begin{document}
\readdef{\jobname.csv}\namedata
\readarray\namedata\names[-,\ncols]
\ncols % Checking the number of columns
\nrows % Checking the number of rows
\names[2,2] and \names[3,3] % Checking some of the entries
\begin{tikzpicture}
\foreach \rr in {1,2,...\nrows}
{
\draw (\names[\rr,1],\names[\rr,2]) circle (\names[\rr,3]); % fails at this line
}
\end{tikzpicture}
\end{document}