数据可视化之matplotlib实战:plt.polar()函数 绘制极线图

    科技2022-07-10  121

    import matplotlib as mpl import matplotlib.pyplot as plt import numpy as np # 防止乱码 mpl.rcParams["font.sans-serif"] = ["SimHei"] mpl.rcParams["axes.unicode_minus"] = False barSlices = 12 theta = np.linspace(0.0, 2*np.pi, barSlices, endpoint=False) r = 30*np.random.rand(barSlices) plt.polar(theta,r, color = "chartreuse", linewidth = 2, marker = "*", mfc = "b", ms = 10) plt.show()

    Processed: 0.044, SQL: 8