title: Total figure width with external legend in matplotlib
body: <p>I'm using</p>
  <p><code>plt.legend(bbox_to_anchor = (1,1))</code></p>
  <p>to put the legend outside my figure. The journal to which I'm submitting requires specific sizes for the figures. When I use this method, it increases the total width of my figure beyond the required size. I want to have the figure sized exactly to specification. Is there a way to calculate the total width of the figure including the external legend, so that I can reduce my figsize parameter accordingly?</p>