Skip to content
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.

Commit

Permalink
Add condition to only plot non-highlighted paths in the case there ar…
Browse files Browse the repository at this point in the history
…e some to plot
  • Loading branch information
jwaton committed Dec 21, 2018
1 parent f0ed2f2 commit 8b070e8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions stability_selection/stability_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,9 @@ def plot_stability_path(stability_selection, threshold_highlight=None,
x_grid = stability_selection.lambda_grid / np.max(stability_selection.lambda_grid)

fig, ax = plt.subplots(1, 1, **kwargs)
ax.plot(x_grid, stability_selection.stability_scores_[~paths_to_highlight].T,
'k:', linewidth=0.5)
if not paths_to_highlight.all():
ax.plot(x_grid, stability_selection.stability_scores_[~paths_to_highlight].T,
'k:', linewidth=0.5)

if paths_to_highlight.any():
ax.plot(x_grid, stability_selection.stability_scores_[paths_to_highlight].T,
Expand Down

0 comments on commit 8b070e8

Please sign in to comment.