Skip to content

Commit a6964ab

Browse files
committed
Plots update
1 parent 646c5a8 commit a6964ab

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

napari_cellseg3d/code_plugins/plugin_model_training.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1435,8 +1435,8 @@ def _plot_loss(
14351435
self.plot_1.plot(x, y, label=metric_name)
14361436
if metric_name == "Dice metric":
14371437
self._show_plot_max(self.plot_1, y)
1438-
1439-
self.plot_1.legend(loc="best")
1438+
if len(loss_values_1.keys()) > 1:
1439+
self.plot_1.legend(loc="best", fontsize="10", markerscale=0.6)
14401440

14411441
# update plot 2
14421442
if self._is_current_job_supervised():
@@ -1520,7 +1520,6 @@ def update_loss_plot(self, loss_1: dict, loss_2: list):
15201520
with plt.style.context("dark_background"):
15211521
self.plot_1.cla()
15221522
self.plot_2.cla()
1523-
15241523
self._plot_loss(loss_1, loss_2, show_plot_2_max=plot_max)
15251524

15261525
def _reset_loss_plot(self):

0 commit comments

Comments
 (0)