Spaces:
Sleeping
Sleeping
Increase figure size and font sizes for better readability
Browse files- Changed figsize to 10x6 inches for 3000x1800px output
- Increased all font sizes by 3-4 points for better text visibility
- Updated display width to 1000px to accommodate larger figures
- Maintains 3:1 pixel ratio for sharp rendering
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
- app.py +2 -2
- new_system_prompt.txt +1 -1
- src.py +7 -7
- vayuchat.mplstyle +8 -8
app.py
CHANGED
|
@@ -503,7 +503,7 @@ def show_custom_response(response):
|
|
| 503 |
<div style='margin: 1rem 0; display: flex; justify-content: center;'>
|
| 504 |
</div>
|
| 505 |
""", unsafe_allow_html=True)
|
| 506 |
-
st.image(content, width=
|
| 507 |
return {"is_image": True}
|
| 508 |
# Also handle case where content shows filename but we want to show image
|
| 509 |
elif isinstance(content, str) and any(ext in content for ext in ['.png', '.jpg']):
|
|
@@ -517,7 +517,7 @@ def show_custom_response(response):
|
|
| 517 |
<div style='margin: 1rem 0; display: flex; justify-content: center;'>
|
| 518 |
</div>
|
| 519 |
""", unsafe_allow_html=True)
|
| 520 |
-
st.image(filename, width=
|
| 521 |
return {"is_image": True}
|
| 522 |
except:
|
| 523 |
pass
|
|
|
|
| 503 |
<div style='margin: 1rem 0; display: flex; justify-content: center;'>
|
| 504 |
</div>
|
| 505 |
""", unsafe_allow_html=True)
|
| 506 |
+
st.image(content, width=1000, caption="Generated Visualization")
|
| 507 |
return {"is_image": True}
|
| 508 |
# Also handle case where content shows filename but we want to show image
|
| 509 |
elif isinstance(content, str) and any(ext in content for ext in ['.png', '.jpg']):
|
|
|
|
| 517 |
<div style='margin: 1rem 0; display: flex; justify-content: center;'>
|
| 518 |
</div>
|
| 519 |
""", unsafe_allow_html=True)
|
| 520 |
+
st.image(filename, width=1000, caption="Generated Visualization")
|
| 521 |
return {"is_image": True}
|
| 522 |
except:
|
| 523 |
pass
|
new_system_prompt.txt
CHANGED
|
@@ -33,7 +33,7 @@ DATA SAFETY:
|
|
| 33 |
- Use .dropna() to remove missing values before analysis
|
| 34 |
|
| 35 |
PLOTTING REQUIREMENTS:
|
| 36 |
-
- Create plots for visualization requests: plt.figure(figsize=(
|
| 37 |
- Save plots with high resolution: filename = f"plot_{uuid.uuid4().hex[:8]}.png"; plt.savefig(filename, dpi=300, bbox_inches='tight', facecolor='white', edgecolor='none')
|
| 38 |
- Close plots: plt.close()
|
| 39 |
- Store filename: answer = filename
|
|
|
|
| 33 |
- Use .dropna() to remove missing values before analysis
|
| 34 |
|
| 35 |
PLOTTING REQUIREMENTS:
|
| 36 |
+
- Create plots for visualization requests: plt.figure(figsize=(10, 6))
|
| 37 |
- Save plots with high resolution: filename = f"plot_{uuid.uuid4().hex[:8]}.png"; plt.savefig(filename, dpi=300, bbox_inches='tight', facecolor='white', edgecolor='none')
|
| 38 |
- Close plots: plt.close()
|
| 39 |
- Store filename: answer = filename
|
src.py
CHANGED
|
@@ -149,13 +149,13 @@ def ask_question(model_name, question):
|
|
| 149 |
plt.style.use('vayuchat.mplstyle')
|
| 150 |
plt.rcParams['figure.dpi'] = 300
|
| 151 |
plt.rcParams['savefig.dpi'] = 300
|
| 152 |
-
plt.rcParams['figure.figsize'] = [
|
| 153 |
-
plt.rcParams['font.size'] =
|
| 154 |
-
plt.rcParams['axes.titlesize'] =
|
| 155 |
-
plt.rcParams['axes.labelsize'] =
|
| 156 |
-
plt.rcParams['xtick.labelsize'] =
|
| 157 |
-
plt.rcParams['ytick.labelsize'] =
|
| 158 |
-
plt.rcParams['legend.fontsize'] =
|
| 159 |
|
| 160 |
global_vars = {
|
| 161 |
'pd': pd, 'plt': plt, 'os': os,
|
|
|
|
| 149 |
plt.style.use('vayuchat.mplstyle')
|
| 150 |
plt.rcParams['figure.dpi'] = 300
|
| 151 |
plt.rcParams['savefig.dpi'] = 300
|
| 152 |
+
plt.rcParams['figure.figsize'] = [10, 6]
|
| 153 |
+
plt.rcParams['font.size'] = 16
|
| 154 |
+
plt.rcParams['axes.titlesize'] = 20
|
| 155 |
+
plt.rcParams['axes.labelsize'] = 16
|
| 156 |
+
plt.rcParams['xtick.labelsize'] = 14
|
| 157 |
+
plt.rcParams['ytick.labelsize'] = 14
|
| 158 |
+
plt.rcParams['legend.fontsize'] = 14
|
| 159 |
|
| 160 |
global_vars = {
|
| 161 |
'pd': pd, 'plt': plt, 'os': os,
|
vayuchat.mplstyle
CHANGED
|
@@ -2,21 +2,21 @@
|
|
| 2 |
# Inspired by modern data visualization best practices
|
| 3 |
|
| 4 |
# Typography & Layout
|
| 5 |
-
font.size:
|
| 6 |
font.family: sans-serif
|
| 7 |
font.sans-serif: Inter, SF Pro Display, Segoe UI, system-ui, Arial
|
| 8 |
-
figure.titlesize:
|
| 9 |
-
axes.titlesize:
|
| 10 |
-
axes.labelsize:
|
| 11 |
-
xtick.labelsize:
|
| 12 |
-
ytick.labelsize:
|
| 13 |
-
legend.fontsize:
|
| 14 |
|
| 15 |
# Figure & DPI - Ultra High Resolution
|
| 16 |
figure.dpi: 300
|
| 17 |
figure.facecolor: white
|
| 18 |
figure.edgecolor: none
|
| 19 |
-
figure.figsize:
|
| 20 |
figure.autolayout: True
|
| 21 |
|
| 22 |
# Modern Color Palette (inspired by Tailwind/GitHub)
|
|
|
|
| 2 |
# Inspired by modern data visualization best practices
|
| 3 |
|
| 4 |
# Typography & Layout
|
| 5 |
+
font.size: 16
|
| 6 |
font.family: sans-serif
|
| 7 |
font.sans-serif: Inter, SF Pro Display, Segoe UI, system-ui, Arial
|
| 8 |
+
figure.titlesize: 20
|
| 9 |
+
axes.titlesize: 18
|
| 10 |
+
axes.labelsize: 16
|
| 11 |
+
xtick.labelsize: 14
|
| 12 |
+
ytick.labelsize: 14
|
| 13 |
+
legend.fontsize: 14
|
| 14 |
|
| 15 |
# Figure & DPI - Ultra High Resolution
|
| 16 |
figure.dpi: 300
|
| 17 |
figure.facecolor: white
|
| 18 |
figure.edgecolor: none
|
| 19 |
+
figure.figsize: 10, 6
|
| 20 |
figure.autolayout: True
|
| 21 |
|
| 22 |
# Modern Color Palette (inspired by Tailwind/GitHub)
|