yhavinga commited on
Commit
92582fa
1 Parent(s): bd572c4

Fix seaborn color parameter

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -298,7 +298,7 @@ mT5 green and the other models black.
298
  y="en->nl Bleu",
299
  x="summ Rouge1",
300
  size="num params (M)",
301
- color=colors,
302
  linewidth=0.7,
303
  )
304
  for i, row in plot_df.iterrows():
@@ -311,6 +311,12 @@ mT5 green and the other models black.
311
  va="center",
312
  rotation=0,
313
  )
 
 
 
 
 
 
314
  plt.tight_layout()
315
  st.pyplot(fig)
316
  st.markdown(
298
  y="en->nl Bleu",
299
  x="summ Rouge1",
300
  size="num params (M)",
301
+ hue=colors,
302
  linewidth=0.7,
303
  )
304
  for i, row in plot_df.iterrows():
311
  va="center",
312
  rotation=0,
313
  )
314
+ # Remove color legend
315
+ handles, labels = ax.get_legend_handles_labels()
316
+ size_legend_labels = ["num params (M)"] + labels[-4:]
317
+ size_legend_handles = handles[-5:]
318
+ ax.legend(handles=size_legend_handles, labels=size_legend_labels)
319
+
320
  plt.tight_layout()
321
  st.pyplot(fig)
322
  st.markdown(