nispace.plotting.move_legend_fig_to_ax

nispace.plotting.move_legend_fig_to_ax(fig, ax, loc, bbox_to_anchor=None, no_legend_error=False, **kwargs)[source]

Move a figure-level legend (as produced by seaborn.objects.Plot) onto a specific axes, merging it with any existing axes-level legend.

Workaround for seaborn.objects always attaching legends to the figure; copied from GitHub user thuiop, https://github.com/mwaskom/seaborn/issues/3247#issuecomment-1420731692.