(draw: ImageDraw.ImageDraw)
| 156 | |
| 157 | |
| 158 | def draw_legend(draw: ImageDraw.ImageDraw) -> None: |
| 159 | x, y = 1605, 245 |
| 160 | for label, fill, edge in [ |
| 161 | ("Closed API", COLORS["closed"], COLORS["closed_edge"]), |
| 162 | ("Open / open-access", COLORS["open"], COLORS["open_edge"]), |
| 163 | ]: |
| 164 | draw.ellipse((x, y - 15, x + 30, y + 15), fill=fill, outline=edge, width=3) |
| 165 | draw.text((x + 42, y - 17), label, font=F_LEGEND, fill=COLORS["text"]) |
| 166 | y += 48 |
| 167 | |
| 168 | |
| 169 | def draw_plot(rows: list[dict[str, object]]) -> Image.Image: |