我创建了极坐标图并想模仿多普勒。这包括围绕圆进行 360 度扫描(极坐标图)。一旦扫描达到 360 度,就需要回到零并继续扫描。
如何设置动画或旋转这条线以不断扫过这个圆?我只想要一条线不断地扫过这个情节。
我已经看过几个不同的例子,但是没有一个能够创建这种旋转。
import numpy as np
import math
import matplotlib.pyplot as plt
import pylab
import time
r = 90 * (math.pi/180)
t = 50000
az = 90
el = 5
fig = pylab.figure(figsize = [5.0, 5.0])
ax = fig.gca(projection = 'polar')
fig.canvas.set_window_title('Doppler')
ax.plot(r, t, color ='b', marker = 'o', markersize = '3')
ax.set_theta_zero_location('N')
ax.set_theta_direction(-1)
currTime = time.time()
prevTime = currTime - 1
deltaTime = currTime - prevTime
outer_border_width = 1
screen_width = 500
screen_height = …
Run Code Online (Sandbox Code Playgroud)