you could also do using Polygon points generation as shown below.
most of the code duplication can be generalized, for understanding peruse it is left as it is.
def plotBull():
import matplotlib.pyplot as plt
plt.axes()
# inner most region #
points = stack3(50,0,180)
line = plt.Polygon(points, closed=True , fill=True ,fc = '#575757' , edgecolor='#575757')
plt.gca().add_patch(line)
plt.text(0,0,'17')
points = stack3(50,-180,0)
line = plt.Polygon(points, closed=True , fill=True ,fc = '#575757' , edgecolor='#575757')
plt.gca().add_patch(line)
# bottom up #############
points = stack3(100,45,135)
line = plt.Polygon(points, closed=True , fill=True ,fc = 'm' , edgecolor='k')
plt.gca().add_patch(line)
plt.text(0,75,'13')
points = stack3(100,135,225)
line = plt.Polygon(points, closed=True , fill=True ,fc = 'g' , edgecolor='k')
plt.gca().add_patch(line)
plt.text(-75,0,'14')
points = stack3(100,225,315)
line = plt.Polygon(points, closed=True , fill=True ,fc = 'b' , edgecolor='k')
plt.gca().add_patch(line)
plt.text(0,-75 ,'15')
points = stack3(100,315,405)
line = plt.Polygon(points, closed=True , fill=True ,fc = 'y' , edgecolor='k')
plt.gca().add_patch(line)
plt.text(75,0,'16')
#botton up1###############
points = stack3(150,0,62)
line = plt.Polygon(points, closed=True , fill=True ,fc = 'c' , edgecolor='k')
plt.gca().add_patch(line)
plt.text(100,60,'12')
points = stack3(150,60,122)
line = plt.Polygon(points, closed=True , fill=True ,fc = '#3358fc' , edgecolor='k')
plt.gca().add_patch(line)
plt.text(0,115,'7')
points = stack3(150,120,182)
line = plt.Polygon(points, closed=True , fill=True ,fc = '#245465' , edgecolor='k')
plt.gca().add_patch(line)
plt.text(-100,60,'8')
points = stack3(150,180,242)
line = plt.Polygon(points, closed=True , fill=True ,fc = '#D3E130' , edgecolor='k')
plt.gca().add_patch(line)
plt.text(-100,-60,'9')
points = stack3(150,240,302)
line = plt.Polygon(points, closed=True , fill=True ,fc = '#8928b1' , edgecolor='k')
plt.gca().add_patch(line)
plt.text(0,-115,'10')
points = stack3(150,300,362)
line = plt.Polygon(points, closed=True , fill=True ,fc = '#12ED89' , edgecolor='k')
plt.gca().add_patch(line)
plt.text(100,-60,'11')
#botton up1###############
points = stack3(200,0,62)
line = plt.Polygon(points, closed=True , fill=True ,fc = '#FF2E34' , edgecolor='k')
plt.gca().add_patch(line)
plt.text(150,80,'6')
points = stack3(200,60,122)
line = plt.Polygon(points, closed=True , fill=True ,fc = 'b' , edgecolor='k')
plt.gca().add_patch(line)
plt.text(0,165,'1')
points = stack3(200,120,182)
line = plt.Polygon(points, closed=True , fill=True ,fc = '#12D154' , edgecolor='k')
plt.gca().add_patch(line)
plt.text(-150,80,'2')
points = stack3(200,180,242)
line = plt.Polygon(points, closed=True , fill=True ,fc = '#D3FF65' , edgecolor='k')
plt.gca().add_patch(line)
plt.text(-150,-80,'3')
points = stack3(200,240,302)
line = plt.Polygon(points, closed=True , fill=True ,fc = '#54DBEF' , edgecolor='k')
plt.gca().add_patch(line)
plt.text(0,-165,'4')
points = stack3(200,300,362)
line = plt.Polygon(points, closed=True , fill=True ,fc = '#C121EE' , edgecolor='k')
plt.gca().add_patch(line)
plt.text(150,-80,'5')
plt.axis('scaled')
plt.axis('off')
plt.show()
def stack3(radius,startAngle,endAngle):
import math
startRadian = math.pi*startAngle/180
endRadian = math.pi*endAngle/180
import math
mainList = []
for idx in range(0,100):
subList = []
theta = 2*3.1415926 * float(idx) / float(100)
theta += startRadian
if theta > endRadian :
break
x = radius* math.cos(theta)
y = radius* math.sin(theta)
subList.append(x)
subList.append(y)
mainList.append(subList)
tempList = []
for idx in range(0,100):
subList = []
theta = 2*3.1415926 * float(idx) / float(100)
theta += startRadian
if theta > endRadian :
break
x = (radius - 50) * math.cos(theta)
y = (radius - 50) * math.sin(theta)
subList.append(x)
subList.append(y)
tempList.append(subList)
tempList.reverse()
for idx in range(0,len(tempList)):
mainList.append(tempList[idx])
return mainList
pass