极坐标/雷达图***** polar=True?
import numpy as np
import matplotlib.pyplot as plt
plt.rcParams['font.family'] = ['SimHei']
准备数据
r=np.arange(0,2,0.01)
theta = 2*np.pi*r
准备画布
fig = plt.figure()
ax =plt.subplot(111,projection='polar')
ax.plot(theta,r)
ax.set_rmax(2)
ax.set_rticks([0.5,1,1.5,2]) # 减少r向刻度
ax.set_rlabel_position(250) # 设置r向刻度标签至250度方向
ax.grid(True) # 网格线图
ax.set_title("极坐标")
plt.show(block=True)