I read through this post, because my plots keep cutting off the legend in the interactive matplotlib window. The solution for saving figures using plt.savefig(bbox_extra_artists=(legend,))
to include additional artists outside the axes works great, but the open window seems to follow a different set of rules. My question is, if there's a way to do the same for the interactive window, because the solution in the post above didn't work for me and just using fig.canvas._tkcanvas.master.geometry(ipythonWindowSize)
streches the plot to the new canvas size. Is there no straighforward way to just provide the legend of a plot to the plt.show()
call like for plt.savefig()
so it doesn't get cut off in the interactive window? The only other way I could think of is to make a gridspec
and display the legend in it's own seperate axes.
I don't use any plt.subplots_adjust()
calls in my script, I just set the figsize
when creating the figure using plt.subplots()
.
My code is pretty long and complex so I hope the references to the post above and a screenshot will suffice to explain what the issue is.