Skip to content

Commit

Permalink
Fix for Python versions lower than 3.9, and update matplotlib backend
Browse files Browse the repository at this point in the history
  • Loading branch information
adjeiv committed Aug 3, 2023
1 parent e17dc22 commit ad6e96c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion optuna/visualization/_intermediate_values.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def _get_intermediate_plot(info: _IntermediatePlotInfo) -> "go.Figure":
mode="lines+markers",
marker=default_marker
if tinfo.feasible
else default_marker | {"color": "#CCCCCC"}, # type: ignore[operator]
else default_marker.update({"color": "#CCCCCC"}), # type: ignore[dict-item]
name="Trial{}".format(tinfo.trial_number),
)
for tinfo in trial_infos
Expand Down
2 changes: 1 addition & 1 deletion optuna/visualization/matplotlib/_intermediate_values.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def _get_intermediate_plot(info: _IntermediatePlotInfo) -> "Axes":
ax.plot(
tuple((x for x, _ in tinfo.sorted_intermediate_values)),
tuple((y for _, y in tinfo.sorted_intermediate_values)),
color=cmap(i),
color=cmap(i) if tinfo.feasible else "#CCCCCC",
marker=".",
alpha=0.7,
label="Trial{}".format(tinfo.trial_number),
Expand Down

0 comments on commit ad6e96c

Please sign in to comment.