From 8bc434a67d0579b8af89cb5560289b2416d411cd Mon Sep 17 00:00:00 2001 From: Gavin Ridley Date: Fri, 14 Apr 2023 12:36:24 -0400 Subject: [PATCH] move legend outside image Co-authored-by: Jonathan Shimwell --- openmc/universe.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openmc/universe.py b/openmc/universe.py index a75af3b0d..a7f9e3d6e 100644 --- a/openmc/universe.py +++ b/openmc/universe.py @@ -428,7 +428,7 @@ class Universe(UniverseBase): key_patch = mpatches.Patch(color=color, label=key.name) patches.append(key_patch) - axes.legend(handles=patches) + axes.legend(handles=patches, bbox_to_anchor=(1.05, 1), loc=2, borderaxespad=0.0) # Plot image and return the axes return axes.imshow(img, extent=(x_min, x_max, y_min, y_max), **kwargs)