Spaces:
Sleeping
Sleeping
Yao-Ting Yao
commited on
Commit
·
c79eaa8
1
Parent(s):
e4fde96
Change plot style in streamlit_app.py
Browse files- src/streamlit_app.py +23 -3
src/streamlit_app.py
CHANGED
|
@@ -323,14 +323,34 @@ plot_html = f"""
|
|
| 323 |
|
| 324 |
// plotly layout
|
| 325 |
const layout = {{
|
|
|
|
|
|
|
| 326 |
title: {title_js},
|
| 327 |
-
xaxis: {{ title: {xaxis_js},
|
| 328 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 329 |
autosize: true,
|
| 330 |
margin: {{ l:40, r:40, t:40, b:40 }},
|
| 331 |
clickmode:'event+select',
|
| 332 |
legend: {{ font:{{ size:12 }}, x:1.01, y:0.5 }}
|
| 333 |
-
}};
|
| 334 |
|
| 335 |
// select the scatter-plot div to render the chart into
|
| 336 |
const gd = document.getElementById('scatter-plot');
|
|
|
|
| 323 |
|
| 324 |
// plotly layout
|
| 325 |
const layout = {{
|
| 326 |
+
paper_bgcolor: "rgb(255,255,255)",
|
| 327 |
+
plot_bgcolor: "rgb(234, 234, 242)",
|
| 328 |
title: {title_js},
|
| 329 |
+
xaxis: {{ title: {xaxis_js},
|
| 330 |
+
range:[-110,110],
|
| 331 |
+
gridcolor: "rgb(255,255,255)",
|
| 332 |
+
showgrid: true,
|
| 333 |
+
showline: false,
|
| 334 |
+
showticklabels: true,
|
| 335 |
+
tickcolor: "rgb(127,127,127)",
|
| 336 |
+
ticks: "outside",
|
| 337 |
+
zeroline: false,
|
| 338 |
+
gridwidth: 1}},
|
| 339 |
+
yaxis: {{ title: {yaxis_js},
|
| 340 |
+
range:[-110,110],
|
| 341 |
+
gridcolor: "rgb(255,255,255)",
|
| 342 |
+
showgrid: true,
|
| 343 |
+
showline: false,
|
| 344 |
+
showticklabels: true,
|
| 345 |
+
tickcolor: "rgb(127,127,127)",
|
| 346 |
+
ticks: "outside",
|
| 347 |
+
zeroline: false,
|
| 348 |
+
gridwidth: 1}},
|
| 349 |
autosize: true,
|
| 350 |
margin: {{ l:40, r:40, t:40, b:40 }},
|
| 351 |
clickmode:'event+select',
|
| 352 |
legend: {{ font:{{ size:12 }}, x:1.01, y:0.5 }}
|
| 353 |
+
}};
|
| 354 |
|
| 355 |
// select the scatter-plot div to render the chart into
|
| 356 |
const gd = document.getElementById('scatter-plot');
|