custom legends don't work in @plotter functions

Issue #43 resolved
Thomas Gilgenast created an issue

if a function decorated with @plotter includes a legend=True kwarg in its signature and uses this kwarg to trigger creation of a custom legend, then the @plotter decorator will fill in the 'legend' key of the plot_kwargs dict, and adjust_plot() will eventually call plt.legend() after the custom legend has been drawn, breaking the custom legend

an example of a function where this happens is lib5c.plotters.pca.plot_pca()

the proposed solution is to make the @plotter decorator treat this as a special case, and pass through legend=None to adjust_plot()

Comments (1)

  1. Log in to comment