Skip to content

Commit

Permalink
🐛✨ Pick colors for selected
Browse files Browse the repository at this point in the history
- for subselected models the colors were not reselected
  • Loading branch information
Henry committed Nov 27, 2023
1 parent 1f2d682 commit e206483
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions project/01_2_performance_plots.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1373,7 +1373,8 @@
" rot=0,\n",
" ylabel=f\"{METRIC} for {feature_names.name} ({n_in_comparison:,} intensities)\",\n",
" # title=f'performance on test data (based on {n_in_comparison:,} measurements)',\n",
" color=COLORS_TO_USE,\n",
" color=vaep.plotting.defaults.assign_colors(\n",
" list(k.upper() for k in SEL_MODELS)),\n",
" ax=ax,\n",
" width=.8)\n",
" ax = vaep.plotting.add_height_to_barplot(ax, size=5)\n",
Expand Down Expand Up @@ -1411,7 +1412,8 @@
" feat_medians=data.train_X.median(),\n",
" ax=ax,\n",
" metric_name=METRIC,\n",
" palette=COLORS_TO_USE\n",
" palette=vaep.plotting.defaults.assign_colors(\n",
" list(k.upper() for k in SEL_MODELS))\n",
" )\n",
" ax.set_ylim(0, 1.5)\n",
" # for text in ax.legend().get_texts():\n",
Expand Down
6 changes: 4 additions & 2 deletions project/01_2_performance_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,8 @@ def highlight_min(s, color, tolerence=0.00001):
rot=0,
ylabel=f"{METRIC} for {feature_names.name} ({n_in_comparison:,} intensities)",
# title=f'performance on test data (based on {n_in_comparison:,} measurements)',
color=COLORS_TO_USE,
color=vaep.plotting.defaults.assign_colors(
list(k.upper() for k in SEL_MODELS)),
ax=ax,
width=.8)
ax = vaep.plotting.add_height_to_barplot(ax, size=5)
Expand Down Expand Up @@ -748,7 +749,8 @@ def highlight_min(s, color, tolerence=0.00001):
feat_medians=data.train_X.median(),
ax=ax,
metric_name=METRIC,
palette=COLORS_TO_USE
palette=vaep.plotting.defaults.assign_colors(
list(k.upper() for k in SEL_MODELS))
)
ax.set_ylim(0, 1.5)
# for text in ax.legend().get_texts():
Expand Down

0 comments on commit e206483

Please sign in to comment.