绘制饼图
(1) 使用饼图查看运动员的惯用脚(Preffered_Foot)字段中不同惯用脚人数的占比。...showmeans=True, patch_artist=True,
)
colors = ['pink', 'blue', 'green', 'yellow', 'red']
# 填充箱子颜色...整除
num_bin = (max(ages) - min(ages)) // bin_width # 组数
# 绘制直方图 x:指定要绘制直方图的数据
# bins:指定直方图条形的个数...color:设置直方图的填充色 edgecolor:指定直方图的边界色
plt.hist(x=ages, bins=num_bin, color='blue', edgecolor='k',...通过使用GridSpec类配合subplot,可以很容易对子区域进行划定和选择,在同一个画板上绘制多个子图。
8.