av6989413
极坐标
import matplotlib.pyplot as plt
import numpy as np
r = np.arange(1,6,1)
theta = [(np.pi/2)*i for i in range(5)]
ax = plt.subplot(111,projection='polar')
ax.plot(theta,r,color='r',linewidth=3)
ax.grid(True)
plt.show()

散点条形图

import matplotlib.pyplot as plt
import numpy as np
plt.style.use('ggplot')
x = np.random.randn(200)
y = x+np.random.randn(200)*0.5
#生成基本结构
margin_border = 0.1
width = 0.6
margin_between = 0.02
height = 0.2
left_s = margin_border
bottom_s = margin_border
height_s = width
width_s = width
left_x = margin_border
bottom_x = margin_border + width + margin_betw

本文介绍了使用Python的matplotlib库进行数据分析的实践经验,包括绘制极坐标图、散点图与条形图,以及如何创建能力雷达图。这些图表在数据分析中起到了直观展示信息的作用。
最低0.47元/天 解锁文章

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



