From d8c8c51156d89bff3cc4d4be69ef09f40655960b Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Wed, 14 Aug 2024 06:21:45 -0700 Subject: [PATCH] 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. --- benchmark/over_time.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/benchmark/over_time.py b/benchmark/over_time.py index f073ad9eb..2e04c7881 100644 --- a/benchmark/over_time.py +++ b/benchmark/over_time.py @@ -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