Nipun Claude commited on
Commit
3ce84d7
·
1 Parent(s): c799978

Remove duplicate matplotlib parameters causing template conflicts

Browse files

- Remove old parameters dictionary that was causing f-string conflicts
- Keep only the clean template with proper DPI 300 setting
- This should fix the syntax errors in generated code

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>

Files changed (1) hide show
  1. src.py +2 -24
src.py CHANGED
@@ -241,29 +241,6 @@ def ask_question(model_name, question):
241
  df_check = df_check.head(5)
242
 
243
  new_line = "\n"
244
- # Professional matplotlib styling
245
- parameters = {
246
- "font.size": 11,
247
- "figure.dpi": 300,
248
- "figure.facecolor": "white",
249
- "axes.facecolor": "white",
250
- "axes.edgecolor": "#e2e8f0",
251
- "axes.linewidth": 1.2,
252
- "axes.labelcolor": "#374151",
253
- "axes.spines.top": False,
254
- "axes.spines.right": False,
255
- "axes.spines.left": True,
256
- "axes.spines.bottom": True,
257
- "axes.grid": True,
258
- "grid.color": "#f1f5f9",
259
- "grid.linewidth": 0.8,
260
- "grid.alpha": 0.7,
261
- "xtick.color": "#6b7280",
262
- "ytick.color": "#6b7280",
263
- "text.color": "#374151",
264
- "figure.figsize": [12, 6],
265
- "axes.prop_cycle": "cycler('color', ['#3b82f6', '#ef4444', '#10b981', '#f59e0b', '#8b5cf6', '#06b6d4'])"
266
- }
267
 
268
  template = f"""```python
269
  import pandas as pd
@@ -292,7 +269,8 @@ plt.rcParams.update({{
292
  'xtick.color': '#6b7280',
293
  'ytick.color': '#6b7280',
294
  'text.color': '#374151',
295
- 'figure.figsize': [12, 6]
 
296
  }})
297
 
298
  df = pd.read_csv("Data.csv")
 
241
  df_check = df_check.head(5)
242
 
243
  new_line = "\n"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
244
 
245
  template = f"""```python
246
  import pandas as pd
 
269
  'xtick.color': '#6b7280',
270
  'ytick.color': '#6b7280',
271
  'text.color': '#374151',
272
+ 'figure.figsize': [12, 6],
273
+ 'axes.prop_cycle': plt.cycler('color', ['#3b82f6', '#ef4444', '#10b981', '#f59e0b', '#8b5cf6', '#06b6d4'])
274
  }})
275
 
276
  df = pd.read_csv("Data.csv")