style: Refactor conditional logic in color assignment

This commit is contained in:
Paul Gauthier (aider) 2024-08-14 06:22:51 -07:00
parent c4f70d81b7
commit 1f6cadcc66

View file

@ -50,10 +50,12 @@ def plot_over_time(yaml_file):
spine.set_linewidth(0.5)
colors = [
"orange" if "-4o-" in model and "gpt-4o-mini" not in model
else "red" if "gpt-4" in model
else "green" if "gpt-3.5" in model
else "blue" for model in models
(
"orange"
if "-4o-" in model and "gpt-4o-mini" not in model
else "red" if "gpt-4" in model else "green" if "gpt-3.5" in model else "blue"
)
for model in models
]
ax.scatter(dates, pass_rates, c=colors, alpha=0.5, s=120)