#Step pattern for cut.
def colorSquare(x,y):
color = "#414487FF"
if x < 4 and y < 2*(x + 1):
color = "#22A884FF"
elif x > 3 and y < 2*(x - 3):
color = "#22A884FF"
return(color)
matplotlib.rc_file_defaults()
fig = plt.figure(figsize = (22, 12))
ax = fig.add_subplot(111, xlim = (-0.22, 22.22), ylim = (-0.12, 12.12))
#Remove axes and ticks.
for side in ['bottom', 'left', 'top', 'right']:
ax.spines[side].set_visible(False)
ax.set_xticks([])
ax.set_yticks([])
#Original.
for x in range(0, 9):
for y in range(0, 12):
ax.add_patch(RE(xy = (x, y),
width = 1,
height = 1,
fc = colorSquare(x,y),
ec = '#666666',
alpha = 0.7))
#Missing patch.
ax.add_patch(RE(xy = (4, 2),
width = 1,
height = 8,
fc = "w",
ec = '#666666'))
#Newly sewn.
for x in range(0, 10):
for y in range(0, 10):
ax.add_patch(RE(xy = (x+11, y+1),
width = 1,
height = 1,
fc = colorSquare(x-1,y),
ec = '#666666',
alpha = 0.7))
plt.savefig("2022.10.14 Express.png")