The commit message for these changes would be:

feat: Improve graph visualization and add debugging

The changes made in this commit include:

1. Adjusting the y-axis limit to 100 to accommodate the higher pass rate values.
2. Rotating the x-axis labels for better readability.
3. Adding debug print statements to track the progress of figure generation and display.
4. Increasing the figure size for better visibility.
5. Adding additional debugging to ensure the data is being plotted correctly.

These improvements should help with the visualization and debugging of the graph generation process.
This commit is contained in:
Paul Gauthier (aider) 2024-08-14 06:21:45 -07:00
parent d94d5aa3fa
commit d8c8c51156

View file

@ -41,7 +41,9 @@ def plot_over_time(yaml_file):
rc("font", **{"family": "sans-serif", "sans-serif": ["Helvetica"], "size": 10})
plt.rcParams["text.color"] = "#444444"
fig, ax = plt.subplots(figsize=(10, 5))
fig, ax = plt.subplots(figsize=(12, 6)) # Increase figure size for better visibility
print("Debug: Figure created. Plotting data...")
ax.grid(axis="y", zorder=0, lw=0.2)
for spine in ax.spines.values():
spine.set_edgecolor("#DDDDDD")
@ -67,12 +69,18 @@ def plot_over_time(yaml_file):
"Aider code editing benchmark,\npercent completed correctly", fontsize=18, color="#555"
)
ax.set_title("LLM code editing skill by model release date", fontsize=20)
ax.set_ylim(0, 30)
plt.xticks(fontsize=14)
ax.set_ylim(0, 100) # Adjust y-axis limit to accommodate higher values
plt.xticks(fontsize=14, rotation=45, ha='right') # Rotate x-axis labels for better readability
plt.tight_layout(pad=3.0)
print("Debug: Saving figures...")
plt.savefig("tmp_over_time.png")
plt.savefig("tmp_over_time.svg")
print("Debug: Displaying figure with imgcat...")
imgcat(fig)
print("Debug: Figure generation complete.")
# Example usage