import matplotlib.pyplot as plt
import matplotlib.patches as patches
from matplotlib.font_manager import FontProperties
# Set up a font properties object for SimHei
#font_prop = FontProperties(fname='/usr/share/fonts/truetype/arphic/ukai.ttc')
#font_prop = FontProperties(fname='d:\\mingliub.ttc')
font_prop = FontProperties(family='SimHei') # Or 'KaiTi' or 'Microsoft YaHei'
# Define the colors and their Chinese names
colors = {
1: ('红', 'red'),
2: ('橘', 'orange'),
3: ('黄', 'yellow'),
4: ('绿', 'green'),
5: ('青', 'cyan'),
6: ('蓝', 'blue'),
7: ('紫', 'purple')
}
# Define the guesses and feedback
guesses = [
[1, 2, 3, 4],
[2, 3, 4, 5],
[3, 4, 1, 6],
[4, 1, 7, 3]
]
feedback = [
(0, 3),
(0, 2),
(0, 2),