This is extremely frustrating. Just as I figured out how to get a substantial legend OUT of my plot using the following:
plt.legend(loc="upper left", bbox_to_anchor=(1,0.75))
Now the following command
plt.savefig(r'test'+'.jpeg', dpi=120*4)
outputs an image where the legend is almost completely cut off from the jpeg. I know its there since I can see part of it but the better part is missing.
How can I fix this please? I have tried to implement the solution from this question to no avail. Furthermore the situation is slightly different here since that question had a legendat the bottom of the axes
and was not trying to save it to a jpeg
like I am.