Spaces:
Sleeping
Sleeping
a0y0346 commited on
Commit ·
7720e5f
1
Parent(s): 73045e3
Fix Online Softmax: move subplot titles inside chart area (y=0.95)
Browse files- src/visualizer.py +7 -2
src/visualizer.py
CHANGED
|
@@ -280,9 +280,14 @@ def create_online_softmax_state(
|
|
| 280 |
row=1, col=2
|
| 281 |
)
|
| 282 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 283 |
fig.update_layout(
|
| 284 |
-
height=
|
| 285 |
-
margin=dict(l=40, r=40, t=
|
| 286 |
showlegend=False,
|
| 287 |
)
|
| 288 |
|
|
|
|
| 280 |
row=1, col=2
|
| 281 |
)
|
| 282 |
|
| 283 |
+
# Move subplot titles down so they don't get cut off by Gradio label
|
| 284 |
+
for annotation in fig['layout']['annotations']:
|
| 285 |
+
annotation['y'] = 0.95
|
| 286 |
+
annotation['yanchor'] = 'top'
|
| 287 |
+
|
| 288 |
fig.update_layout(
|
| 289 |
+
height=380,
|
| 290 |
+
margin=dict(l=40, r=40, t=30, b=40),
|
| 291 |
showlegend=False,
|
| 292 |
)
|
| 293 |
|