I don't think that this is possible. However, in your case the /
notations isn't really necessary:
\begin{tikzpicture}
\foreach \y [count=\i] in {0,0.25,...,1} {
\only<\i>{
\draw (0,0) rectangle (1,1);
\draw (0,0) -- (1,\y);
}
}
\end{tikzpicture}
For more complicated cases, when one variable is dependent on the other via some formula, you can also use
\begin{tikzpicture}
\foreach \i [evaluate=\i as \y using (\i-1)*0.25] in {1,2,...,5} {
\only<\i>{
\draw (0,0) rectangle (1,1);
\draw (0,0) -- (1,\y);
}
}
\end{tikzpicture}
With tkz-fct
and gnuplot
\documentclass[]{scrartcl}
\usepackage{tkz-fct}
\begin{document}
\begin{tikzpicture}[scale=1.25]
\tkzInit[xmax=8,ymax=4]
\tkzAxeXY[ticks=false]
\tkzGrid
\tkzFct[color = red, domain =0.125:8]{4./x}
\tkzDrawRiemannSumInf[fill=green!60,
opacity=.2,
color=green,
line width=1pt,
interval=1:8,
number=7]
\foreach \x/\t in {1.5/$a_1$,2.5/$a_2$,3.5/$a_3$,7.5/$a_7$}
\node[green!50!black] at (\x,{4/(\x+1)-0.25}){\t};
\end{tikzpicture}
\end{document}
Best Answer
With stippling
Since Mark Wibrow has shown us
how to get stippling
, let's use it:The code:
Without stippling
The code: