I'm trying to iterate in parametric mode to plot several concentric arcs of circles with the parameter t
ranging according to a function. I've tried, among others,
a=sqrt(2)
plot [-pi/2:pi/2] a*cos(t), a*sin(t)
do for [i=2:10] {
a=sqrt(2)/i
set trange [-1./2*acos(-(a**2)/2.):1./2*acos(-(a**2)/2.)]
replot a*cos(t), a*sin(t)
}
what I see is a plot of 10 identical overlapped arcs. I also replaced replot
with plot
and only the last arc is retained.
I know "that iteration does not work for plots in parametric mode" (ref. "plot for" in the manual), but this is using a do for
construct. There must be a way to do this! How?
System: gnuplot Version 5.2 patchlevel 2, windows 10.