MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / draw_legend

Function draw_legend

experiments/human_eval/draw_model_eval_numberline.py:129–144  ·  view source on GitHub ↗
(draw: ImageDraw.ImageDraw)

Source from the content-addressed store, hash-verified

127
128
129def draw_legend(draw: ImageDraw.ImageDraw) -> None:
130 y = 130
131 items = [
132 ("ModelAutoScore", COLORS["auto"], COLORS["auto_dark"]),
133 ("ModelHumanScore", COLORS["human"], COLORS["human_dark"]),
134 ]
135 x = 1450
136 for label, fill, outline in items:
137 draw.ellipse((x, y - 12, x + 24, y + 12), fill=fill, outline=outline, width=3)
138 draw.text((x + 36, y - 15), label, font=F_SMALL_BOLD, fill=COLORS["text"])
139 x += 310
140
141 rounded_rect(draw, (1450, 172, 1515, 202), 8, COLORS["closed"])
142 draw.text((1530, 170), "Closed", font=F_SMALL, fill=COLORS["text"])
143 rounded_rect(draw, (1665, 172, 1730, 202), 8, COLORS["open"])
144 draw.text((1745, 170), "Open", font=F_SMALL, fill=COLORS["text"])
145
146
147def draw_axis(draw: ImageDraw.ImageDraw, y0: int, y1: int) -> None:

Callers 1

draw_plotFunction · 0.70

Calls 1

rounded_rectFunction · 0.85

Tested by

no test coverage detected