海康域名网站,室内设计效果图手绘线稿,网站后台管理系统有哪些,视频号运营基础课程圆环图是一种特殊的图形#xff0c;它可以显示各个部分与整体之间的关系。圆环图由两个或多个大小不一的饼图叠加而成#xff0c;中间被挖空#xff0c;看起来像一个甜甜圈。因此#xff0c;圆环图也被称为“甜甜圈”图。
与饼图相比#xff0c;圆环图的空间利用率更高它可以显示各个部分与整体之间的关系。圆环图由两个或多个大小不一的饼图叠加而成中间被挖空看起来像一个甜甜圈。因此圆环图也被称为“甜甜圈”图。
与饼图相比圆环图的空间利用率更高可以对比多组不同的数据。在圆环图中数据源自数据表的行或列排列在工作表的列或行中。它不仅能对比一组数据还能对比多组不同的数据更能突出地显示数据的分布情况。
此外圆环图还可以显示文本信息标题等。在圆环图中中间空心的部分可以用来展示数据的总数用圆环的弧长和颜色表示不同数据的占比图表旁边有图例用来解释说明。
import matplotlib.pyplot as plt
# Setting labels for items in Chart
Employee [Roshni, Shyam, Priyanshi,Harshit, Anmol]
# Setting size in Chart based on
# given values
Salary [40000, 50000, 70000, 54000, 44000]
# colors
colors [#FF0000, #0000FF, #FFFF00,#ADFF2F, #FFA500]
# explosion
explode (0.05, 0.05, 0.05, 0.05, 0.05)
# Pie Chart
plt.pie(Salary, colorscolors, labelsEmployee,autopct%1.1f%%, pctdistance0.85,explodeexplode)
# draw circle
centre_circle plt.Circle((0, 0), 0.70, fcwhite)
fig plt.gcf()
# Adding Circle in Pie chart
fig.gca().add_artist(centre_circle)
# Adding Title of chart
plt.title(Employee Salary Details)
# Displaing Chart
plt.show()
import matplotlib.pyplot as plt# 数据
labels [Label1, Label2, Label3, Label4]
sizes [15, 30, 45, 10]
colors [gold, yellowgreen, lightcoral, lightskyblue]# 绘图
fig1, ax1 plt.subplots()
ax1.pie(sizes, labelslabels, colorscolors, autopct%1.1f%%, startangle90)
ax1.axis(equal) # Equal aspect ratio ensures that pie is drawn as a circle.# Draw a white circle at the center
centre_circle plt.Circle((0, 0), 0.70, fcwhite)
fig plt.gcf()
fig.gca().add_artist(centre_circle)plt.show()