Skip to content

Commit 5d79c1e

Browse files
authored
Merge pull request #15496 from rmcdermo/master
Python: fix redundant legend entries for same plot filename
2 parents c167129 + 5213ba1 commit 5d79c1e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Utilities/Python/fdsplotlib.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,15 +422,19 @@ def dataplot(config_filename,**kwargs):
422422
key_labels = (raw_keys + [None] * len(y_plot_list))[:len(y_plot_list)]
423423

424424
# --- Create new figure or reuse last one ---
425-
if pp.Plot_Filename != Plot_Filename_Last:
425+
if dtest:
426426
if verbose:
427427
print(f"Generating plot {csv_rownum} {pltdir}{pp.Plot_Filename}...")
428428
if close_figs:
429429
plt.close('all')
430430
first_plot = True
431-
else:
431+
elif ftest:
432432
f = f_Last
433433
first_plot = False
434+
else:
435+
if verbose:
436+
print(f"[dataplot] Skipping unrecognized switch_id '{pp.switch_id}' on line {csv_rownum}")
437+
continue
434438

435439
# --- Plot Exp curves (handles both cases) ---
436440
for i, (x_i, y_i) in enumerate(zip(x_plot_list, y_plot_list)):

0 commit comments

Comments
 (0)