mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 00:35:00 +00:00
aider: Set font color using plt.rcParams
to resolve KeyError
for unrecognized key "font.color".
# Aider chat conversation: USER: KeyError: 'Unrecognized key "font.color" for group "font" and name "color"' ASSISTANT: To fix the `KeyError` related to the unrecognized key "font.color", we need to set the font color using `plt.rcParams` instead of `rc`. Here are the changes: benchmark/swe_bench_lite.py ```python <<<<<<< SEARCH rc("font", **{"family": "sans-serif", "sans-serif": ["Helvetica"], "size": 10, "color": "#444444"}) ======= rc("font", **{"family": "sans-serif", "sans-serif": ["Helvetica"], "size": 10}) plt.rcParams["text.color"] = "#444444" >>>>>>> REPLACE ``` benchmark/over_time.py ```python <<<<<<< SEARCH rc("font", **{"family": "sans-serif", "sans-serif": ["Helvetica"], "size": 10, "color": "#444444"}) ======= rc("font", **{"family": "sans-serif", "sans-serif": ["Helvetica"], "size": 10}) plt.rcParams["text.color"] = "#444444" >>>>>>> REPLACE ```
This commit is contained in:
parent
81ac2e18cc
commit
1f7ff54717
2 changed files with 4 additions and 2 deletions
|
@ -21,7 +21,8 @@ def plot_swe_bench_lite(data_file):
|
|||
plt.rcParams["hatch.linewidth"] = 0.5
|
||||
plt.rcParams["hatch.color"] = "#444444"
|
||||
|
||||
rc("font", **{"family": "sans-serif", "sans-serif": ["Helvetica"], "size": 10, "color": "#444444"})
|
||||
rc("font", **{"family": "sans-serif", "sans-serif": ["Helvetica"], "size": 10})
|
||||
plt.rcParams["text.color"] = "#444444"
|
||||
|
||||
fig, ax = plt.subplots(figsize=(10, 5))
|
||||
ax.grid(axis="y", zorder=0, lw=0.2)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue