Skip to content

Commit 035407b

Browse files
authored
Guard against empty artist list (#41136)
1 parent 12cdfdd commit 035407b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Framework/PythonInterface/mantid/plots/plotfunctions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,8 @@ def _do_single_plot(ax, workspaces, errors, set_title, nums, kw, plot_kwargs, lo
574574
plot_fn(ws, **_plot_kwargs)
575575

576576
_set_axes_limits_from_properties(ax)
577-
ax.make_legend()
577+
if nums:
578+
ax.make_legend()
578579
if set_title:
579580
workspace_names = [ws.name() for ws in workspaces]
580581
title = ", ".join(workspace_names)

0 commit comments

Comments
 (0)