博客已经搬家到“捕获完成”:
https://www.v2python.com
雷达图 两款
"""
=======================
Pie chart on polar axis
=======================
Demo of bar plot on a polar axis.
"""
import numpy as np
import matplotlib.pyplot as plt
# Compute pie slices
N = 20
theta = np.linspace(0.0, 2 * np.pi, N, endpoint=False)
radii = 10 * np.random.rand(N)
width = np.pi / 4 * np.random.rand(N)
ax = plt.subplot(111, projection='polar')
bars = ax.bar(theta, radii, width=width, bottom=0.0)
# Use custom colors and opacity
for r, bar in zip(radii, bars):
bar.set_facecolor(plt.cm.viridis(r / 10.))
bar.set_alpha(0.5)
plt.show()
"""
==========================
Scatter plot on polar axis
==========================
Demo of scatter plot on a

该博客已迁移至'捕获完成'平台,主要介绍了如何使用matplotlib库在Python中创建雷达图,包括两种不同的实现方法。
最低0.47元/天 解锁文章
592

被折叠的 条评论
为什么被折叠?



