Apr-07-2019, 02:11 AM
Instead of 10 functions, I'd just have one. Then just have one variable full of all the circles.
def f(num, x): return (num/10) * np.exp(x*1j) circles = [] for i in range(1, 11): circles.append([ [f(i, n).real for n in np.linspace(0,2*np.pi,1000)], [f(i, n).imag for n in np.linspace(0,2*np.pi,1000)] ]) for circ in circles: plt.plot(*circ) plt.show()Or, you can skip the intermediary variable(s):
for i in range(1, 11): plt.plot( [f(i, n).real for n in np.linspace(0,2*np.pi,1000)], [f(i, n).imag for n in np.linspace(0,2*np.pi,1000)] ) plt.show()