I want to plot something with the legend outside the figure. I am using
legend(bbox_to_anchor=(1.2, 1))
To position the legend and then I have to do
tight_layout()
To make sure the plot is complete when saved to a file.
Unfortunately, tight_layout
pushes the legend into the figure no matter what values I put in the legend function. Is there any other way to make sure the legend is not touching the figure?