matplotlib 饼状图"/>
matplotlib 饼状图
import matplotlib.pyplot as plt
import numpy as np
# _ 禁止log日志打印
# 设置字体的大小 (全局)
rcParams['font.size'] = 20
plt.figure(figsize=(7,7))
# autopct:显示百分比 explode:将某个区域 如dog 进行突出 shadow:立体感觉
_ = plt.pie([0.38,0.42,0.2],labels=['tiger','dog','pig'],autopct='%0.2f%%',explode=[0,0.2,0],shadow=True)
更多推荐
matplotlib 饼状图
发布评论