import numpy as np import matplotlib.pyplot as plt
circleNum = 30 # 同时圆刻度值 pointNum = 20 # 点的数量 theta = np.linspace(0.0, 2*np.pi, pointNum, endpoint=False) s = circleNum * np.random.rand(pointNum) # plt.polar(theta, s, linestyle='None', marker='*') # 无连接线,星星点 plt.polar(theta, s, linestyle=':', marker='*', markerfacecolor='r', markersize=10) # 虚连接线,星星点,红色,10号大小星星 # plt.polar(theta, s) # 实心连线plt.fill(theta, s, alpha=0.2) # 区域内透明度 0.2 填充 plt.show()