#Draw cube with numbers at vertices.
def primeCube(p0, p1, p2, p3, s):
fig = plt.figure(figsize = (6, 5))
ax = fig.add_subplot(111, xlim = (-0.3, 12.3), ylim = (-0.25, 10.2))
#Remove axes and ticks.
for side in ['bottom', 'left', 'top', 'right']:
ax.spines[side].set_visible(False)
ax.set_xticks([])
ax.set_yticks([])
#Front Face.
ax.plot((0, 9, 9, 0, 0),
(0, 0, 9, 9, 0),
c = 'k',
ls = '-',
lw = 1)
#Top Face.
ax.plot((0, 9, 12, 3, 0),
(9, 9, 10, 10, 9),
c = 'k',
ls = '-',
lw = 1)
#Right Face.
ax.plot((9, 12, 12, 9, 9),
(0, 1, 10, 9, 0),
c = 'k',
ls = '-',
lw = 1)
#Rear vertices.
for p in [(0, 0), (3, 10), (12, 1)] :
ax.plot((3, p[0]),
(1, p[1]),
c = 'k',
ls = ':',
lw = 1)
labels = [(p0[0], (3.1, 10.1), '#73D055'),
(p0[1], (9.1, 0.1), '#73D055'),
(p1[0], (0.1, 0.1), '#1F968B'),
(p1[1], (12.1, 10.1), '#1F968B'),
(p2[0], (9.1, 9.1), '#39568C'),
(p2[1], (3.1, 1.1), '#39568C'),
(p3[0], (12.1, 1.1), '#440154'),
(p3[1], (0.1, 9.1), '#440154')]
#Lables.
for l in labels :
plt.annotate(l[0], l[1], c = l[2], fontsize = 22, weight = "bold")
fig.savefig("2022.02.11 Classic" + s + ".png")