TimWindecker commited on
Commit
3afc45c
·
verified ·
1 Parent(s): 528af52

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +17 -20
src/streamlit_app.py CHANGED
@@ -172,6 +172,7 @@ def create_bar_chart(df, view_type):
172
  color_continuous_scale=px.colors.diverging.Fall,
173
  orientation="v",
174
  )
 
175
  fig.update_layout(
176
  xaxis_title_text="Model",
177
  yaxis_title_text="Score (Lower is better)",
@@ -182,12 +183,13 @@ def create_bar_chart(df, view_type):
182
  height=600,
183
  showlegend=False,
184
  margin=dict(
185
- l=80, # Left
186
- r=0, # Right
187
- b=80, # Bottom
188
- t=70, # Top
189
- pad=0 # Padding
190
  ),
 
191
  )
192
 
193
  # Remove the color legend from the chart.
@@ -227,7 +229,7 @@ def create_bar_chart(df, view_type):
227
  x="model",
228
  y="score",
229
  color="embodiment",
230
- color_continuous_scale=px.colors.qualitative.Plotly,
231
  orientation="v",
232
  )
233
  max_score = df_fig["score"].max()
@@ -241,33 +243,28 @@ def create_bar_chart(df, view_type):
241
  barmode="group",
242
  height=600,
243
  margin=dict(
244
- l=80, # Left
245
- r=0, # Right
246
- b=80, # Bottom
247
- t=70, # Top
248
- pad=0 # Padding
249
  ),
250
  showlegend=True,
251
  legend=dict(
 
252
  x=0,
253
  y=1,
254
  xanchor="left",
255
  yanchor="top",
256
- bgcolor="rgba(255,255,255,0)",
257
- bordercolor="rgba(0,0,0,0)",
258
  borderwidth=1,
259
  itemclick="toggle",
260
  itemdoubleclick="toggleothers",
261
- title=dict(
262
- text=f"<b>Embodiments</b>",
263
- font=dict(size=12),
264
- side="top center",
265
- ),
266
- font=dict(size=10)
267
  ),
268
  uniformtext_minsize=10,
269
  uniformtext_mode="show",
270
- yaxis_range=[0, max_score * 1.25]
271
  )
272
 
273
  # Remove the color legend from the chart.
 
172
  color_continuous_scale=px.colors.diverging.Fall,
173
  orientation="v",
174
  )
175
+ max_score = df_fig["score"].max()
176
  fig.update_layout(
177
  xaxis_title_text="Model",
178
  yaxis_title_text="Score (Lower is better)",
 
183
  height=600,
184
  showlegend=False,
185
  margin=dict(
186
+ l=80, # Left
187
+ r=0, # Right
188
+ b=80, # Bottom
189
+ t=70, # Top
190
+ pad=0 # Padding
191
  ),
192
+ yaxis_range=[0, max_score * 1.25],
193
  )
194
 
195
  # Remove the color legend from the chart.
 
229
  x="model",
230
  y="score",
231
  color="embodiment",
232
+ color_discrete_sequence=px.colors.qualitative.Plotly,
233
  orientation="v",
234
  )
235
  max_score = df_fig["score"].max()
 
243
  barmode="group",
244
  height=600,
245
  margin=dict(
246
+ l=80, # Left
247
+ r=0, # Right
248
+ b=80, # Bottom
249
+ t=70, # Top
250
+ pad=0 # Padding
251
  ),
252
  showlegend=True,
253
  legend=dict(
254
+ orientation="h",
255
  x=0,
256
  y=1,
257
  xanchor="left",
258
  yanchor="top",
 
 
259
  borderwidth=1,
260
  itemclick="toggle",
261
  itemdoubleclick="toggleothers",
262
+ title_text="<b>Embodiments</b>",
263
+ font=dict(size=15)
 
 
 
 
264
  ),
265
  uniformtext_minsize=10,
266
  uniformtext_mode="show",
267
+ yaxis_range=[0, max_score * 1.25],
268
  )
269
 
270
  # Remove the color legend from the chart.