Hello. I have a task to connect the dots, but no matter how I try, nothing comes out of either a point or an empty graph.
How can you connect the points so that a network is formed?
And the question is not the topic, why the grid is not specified on the second graph? It is set only if it is explicit in a cycle to write.
import matplotlib.pyplot as plt import numpy as np def polar(n,m,L=(0,0),scale=1): #n - кол-во кругов, m - кол-во точек, L - центр, scale - масштаб dr=1/n#Расстояние df=(2*np.pi)/m#Поворот for i in range(n+1): for k in range(m+1): z=i*dr*np.cos(k*df)+1j*i*dr*np.sin(k*df) w=(z-1)**2 plt.subplot(122) plt.plot(w.real*scale,w.imag*scale,'r.') circle=i*dr*np.cos(k*df)+1j*i*dr*np.sin(k*df) plt.subplot(121) plt.plot(circle.real*scale,circle.imag*scale,'r.') plt.axis('equal') plt.ylabel('Imaginary') plt.xlabel('Real') plt.grid(True) plt.show() polar(25,25) 

plot()can connect dots if there are more than one ... - MaxU